[FFmpeg-devel] [PATCH] avutil/opt: Fix AV_OPT_TYPE_BINARY case in av_opt_is_set_to_default()

Michael Niedermayer michaelni at gmx.at
Mon Dec 8 15:40:00 CET 2014


On Mon, Dec 08, 2014 at 01:13:37AM +0100, Lukasz Marek wrote:
> W dniu niedziela, 7 grudnia 2014 Michael Niedermayer <michaelni at gmx.at>
> napisał(a):
> 
> > Fixes CID1257010
> >
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at <javascript:;>>
> > ---
> >  libavutil/opt.c |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavutil/opt.c b/libavutil/opt.c
> > index 4cf2069..d03df60 100644
> > --- a/libavutil/opt.c
> > +++ b/libavutil/opt.c
> > @@ -1788,9 +1788,9 @@ int av_opt_is_set_to_default(void *obj, const
> > AVOption *o)
> >          } tmp = {0};
> >          int opt_size = *(int *)((void **)dst + 1);
> >          void *opt_ptr = *(void **)dst;
> > -        if (!opt_ptr && (!o->default_val.str ||
> > !strlen(o->default_val.str)))
> > +        if (!opt_size && (!o->default_val.str ||
> > !strlen(o->default_val.str)))
> >              return 1;
> > -        if (opt_ptr && o->default_val.str && !strlen(o->default_val.str))
> > +        if (!opt_size || (!o->default_val.str ||
> > !strlen(o->default_val.str)))
> >              return 0;
> 
> 
>  You can remove (), patch should be ok.

removed, applied

thanks

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

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141208/ba485cda/attachment.asc>


More information about the ffmpeg-devel mailing list