avutil/opt: Fix AV_OPT_TYPE_BINARY case in av_opt_is_set_to_default()

Fixes CID1257010

Reviewed-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-12-07 19:53:18 +01:00
parent 9bd8f2cc32
commit 41a52740d4
1 changed files with 2 additions and 2 deletions

View File

@ -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;
if (opt_size != strlen(o->default_val.str) / 2)
return 0;