[FFmpeg-cvslog] AVOptions: av_set_string3() allow NULL strings

Michael Niedermayer git at videolan.org
Mon May 2 03:02:09 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May  1 22:40:01 2011 +0200| [3862ebba23cc9a76a004edd4c12d0b853a0426cd] | committer: Michael Niedermayer

AVOptions: av_set_string3() allow NULL strings
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 5705b40..720ad99 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -119,7 +119,7 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons
         *o_out = o;
     if (!o)
         return AVERROR_OPTION_NOT_FOUND;
-    if (!val || o->offset<=0)
+    if ((!val && o->type != FF_OPT_TYPE_STRING) || o->offset<=0)
         return AVERROR(EINVAL);
 
     if (o->type == FF_OPT_TYPE_BINARY) {



More information about the ffmpeg-cvslog mailing list