[FFmpeg-cvslog] ffmpeg: do not fail when options are routed to libavformat and libavcodec and only one can be used
Michael Niedermayer
git at videolan.org
Fri Jan 3 03:55:23 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jan 3 02:16:35 2014 +0100| [8a1714ad85dd5defdf1fb2baba9ababebfa47d01] | committer: Michael Niedermayer
ffmpeg: do not fail when options are routed to libavformat and libavcodec and only one can be used
Fixes setting frame_size for pulse demuxer
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8a1714ad85dd5defdf1fb2baba9ababebfa47d01
---
ffmpeg_opt.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index d267c6d..4e0dc47 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -915,8 +915,13 @@ static int open_input_file(OptionsContext *o, const char *filename)
const AVClass *class = avcodec_get_class();
const AVOption *option = av_opt_find(&class, e->key, NULL, 0,
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
- if (!option)
+ const AVClass *fclass = avformat_get_class();
+ const AVOption *foption = av_opt_find(&fclass, e->key, NULL, 0,
+ AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
+ if (!option || foption)
continue;
+
+
if (!(option->flags & AV_OPT_FLAG_DECODING_PARAM)) {
av_log(NULL, AV_LOG_ERROR, "Codec AVOption %s (%s) specified for "
"input file #%d (%s) is not a decoding option.\n", e->key,
More information about the ffmpeg-cvslog
mailing list