Browse Source

Make av_set_string3() print a message in case of unknown option.

Originally committed as revision 18826 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Stefano Sabatini 16 years ago
parent
commit
be1fb76fa1
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavcodec/opt.c

+ 3
- 1
libavcodec/opt.c View File

@@ -112,8 +112,10 @@ 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)
if(!o) {
av_log(obj, AV_LOG_ERROR, "Unknown option '%s'\n", name);
return AVERROR(ENOENT);
}
if(!val || o->offset<=0)
return AVERROR(EINVAL);



Loading…
Cancel
Save