Commit 3862ebba authored by Michael Niedermayer's avatar Michael Niedermayer

AVOptions: av_set_string3() allow NULL strings

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 007d352c
...@@ -119,7 +119,7 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons ...@@ -119,7 +119,7 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons
*o_out = o; *o_out = o;
if (!o) if (!o)
return AVERROR_OPTION_NOT_FOUND; return AVERROR_OPTION_NOT_FOUND;
if (!val || o->offset<=0) if ((!val && o->type != FF_OPT_TYPE_STRING) || o->offset<=0)
return AVERROR(EINVAL); return AVERROR(EINVAL);
if (o->type == FF_OPT_TYPE_BINARY) { if (o->type == FF_OPT_TYPE_BINARY) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment