[FFmpeg-cvslog] ffmpeg: look for encoding options in both avcodec and avformat

Clément Bœsch git at videolan.org
Fri Aug 15 23:56:18 CEST 2014


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Fri Aug 15 21:11:57 2014 +0200| [11aab8d6cb3bac84a228bfe68e0533e4c2667bdb] | committer: Clément Bœsch

ffmpeg: look for encoding options in both avcodec and avformat

This patch is the same as 8a1714ad85dd5defdf1fb2baba9ababebfa47d01 but
applied to encoding. It fixes the current clash of the -password option
between tta decoder and the icecast protocol.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11aab8d6cb3bac84a228bfe68e0533e4c2667bdb
---

 ffmpeg_opt.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 3cf78f0..593c4f0 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -2014,8 +2014,13 @@ loop_end:
         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_ENCODING_PARAM)) {
             av_log(NULL, AV_LOG_ERROR, "Codec AVOption %s (%s) specified for "
                    "output file #%d (%s) is not an encoding option.\n", e->key,



More information about the ffmpeg-cvslog mailing list