[FFmpeg-devel] [PATCH] Fix yet another av_set_string() bug
Stefano Sabatini
stefano.sabatini-lala
Wed May 14 14:45:24 CEST 2008
On date Wednesday 2008-05-14 13:13:12 +0200, Michael Niedermayer encoded:
> On Wed, May 14, 2008 at 01:03:40PM +0200, Stefano Sabatini wrote:
> > Hi all,
> >
> > when the av_set_number() is called with a parsable yet not valid
> > (e.g. out of range) value then av_set_string() should return NULL.
> >
> > Check the bug for example with:
> > ffmpeg -bt -1000
> >
> > Regards.
> > --
> > FFmpeg = Fiendish and Fast MultiPurpose EnGine
>
> > Index: libavcodec/opt.c
> > ===================================================================
> > --- libavcodec/opt.c (revision 13153)
> > +++ libavcodec/opt.c (working copy)
> > @@ -182,9 +182,9 @@
> > }else if(cmd=='-')
> > d= -d;
> >
> > - av_set_number(obj, name, d, 1, 1);
> > + o= av_set_number(obj, name, d, 1, 1);
> > val+= i;
> > - if(!*val)
> > + if(!*val || !o)
> > return o;
>
> rejected, you misuse o as a temporary variable
OK, check this one.
Regards.
--
FFmpeg = Fast and Free Majestic Power EnGine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-av-set-string2-01.patch
Type: text/x-diff
Size: 447 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080514/21c114a3/attachment.patch>
More information about the ffmpeg-devel
mailing list