1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

AVOptions: av_set_string3() allow NULL strings

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-05-01 22:40:01 +02:00
parent 007d352c1c
commit 3862ebba23

View File

@ -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) {