diff --git a/libavcodec/opt.c b/libavcodec/opt.c index c7218296f6..a6abcfc2e7 100644 --- a/libavcodec/opt.c +++ b/libavcodec/opt.c @@ -112,10 +112,8 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons const AVOption *o= av_find_opt(obj, name, NULL, 0, 0); if (o_out) *o_out = o; - if(!o) { - av_log(obj, AV_LOG_ERROR, "Unknown option '%s'\n", name); + if(!o) return AVERROR(ENOENT); - } if(!val || o->offset<=0) return AVERROR(EINVAL);