[FFmpeg-devel] [PATCH v2] avcodec/noise_bsf: Check for wrapped frames

Michael Niedermayer michael at niedermayer.cc
Tue Jun 6 01:09:56 EEST 2023


On Mon, Jun 05, 2023 at 12:21:13PM +0200, Anton Khirnov wrote:
> Quoting Michael Niedermayer (2023-06-04 21:53:22)
> > Wrapped frames contain pointers so they need specific code to
> > noise them, the generic code would lead to segfaults
> > 
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> >  libavcodec/noise_bsf.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/libavcodec/noise_bsf.c b/libavcodec/noise_bsf.c
> > index 168f3aa373..2985a8ec4f 100644
> > --- a/libavcodec/noise_bsf.c
> > +++ b/libavcodec/noise_bsf.c
> > @@ -86,6 +86,13 @@ static int noise_init(AVBSFContext *ctx)
> >              return AVERROR(ENOMEM);
> >      }
> >  
> > +    if (ctx->par_in->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME &&
> > +        strcmp(s->amount_str, "0")
> > +    ) {
> 
> Why is this on a separate line?

Probably because i pressed the enter key. Ill remove the \n

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230606/4aa49962/attachment.sig>


More information about the ffmpeg-devel mailing list