summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-01 22:40:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-02 02:58:09 +0200
commit3862ebba23cc9a76a004edd4c12d0b853a0426cd (patch)
tree158e8c0e36d193ddaf4d8ca1f2bf107d139c0483 /libavutil
parent007d352c1ca73ffbfa249af51c26abf933c3c842 (diff)
AVOptions: av_set_string3() allow NULL strings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/opt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 5705b40490..720ad99e8e 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) {