diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-07 19:53:18 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-08 15:39:17 +0100 |
commit | 41a52740d47ac0b02e99ae90ff9212cce71753e7 (patch) | |
tree | 39bbf344310ee781d6dd9eccf0606cfb1864fb32 /libavutil/opt.c | |
parent | 9bd8f2cc32c2616c2bc010dd50f542ce6a85162b (diff) | |
download | ffmpeg-41a52740d47ac0b02e99ae90ff9212cce71753e7.tar.gz |
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>
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r-- | libavutil/opt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index 4cf20693ff..af413d4b35 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; if (opt_size != strlen(o->default_val.str) / 2) return 0; |