Commit 41a52740 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/opt: Fix AV_OPT_TYPE_BINARY case in av_opt_is_set_to_default()

Fixes CID1257010
Reviewed-by: 's avatarLukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9bd8f2cc
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment