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

Michael Niedermayer git at videolan.org
Mon Dec 8 15:47:04 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec  7 19:53:18 2014 +0100| [41a52740d47ac0b02e99ae90ff9212cce71753e7] | committer: Michael Niedermayer

avutil/opt: Fix AV_OPT_TYPE_BINARY case in av_opt_is_set_to_default()

Fixes CID1257010

Reviewed-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=41a52740d47ac0b02e99ae90ff9212cce71753e7
---

 libavutil/opt.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 4cf2069..af413d4 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;



More information about the ffmpeg-cvslog mailing list