From 3862ebba23cc9a76a004edd4c12d0b853a0426cd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 1 May 2011 22:40:01 +0200 Subject: [PATCH] AVOptions: av_set_string3() allow NULL strings Signed-off-by: Michael Niedermayer --- libavutil/opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {