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

Lukasz Marek lukasz.m.luki2 at gmail.com
Mon Dec 8 01:13:37 CET 2014


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.


More information about the ffmpeg-devel mailing list