[FFmpeg-cvslog] cmdutils: Allow calling filter_codec_opts without a set encoder

Martin Storsjö git at videolan.org
Fri Mar 1 12:54:26 CET 2013


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Wed Feb 27 23:21:06 2013 +0200| [cb6f8245aed2c26fe95c30cd68c45983277a945a] | committer: Martin Storsjö

cmdutils: Allow calling filter_codec_opts without a set encoder

In this case, no encoder specific options are filtered, only
options specific to that codec type in general.

Signed-off-by: Martin Storsjö <martin at martin.st>

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

 cmdutils.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index 688f501..fa56326 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1462,10 +1462,8 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
     if (!codec)
         codec            = s->oformat ? avcodec_find_encoder(codec_id)
                                       : avcodec_find_decoder(codec_id);
-    if (!codec)
-        return NULL;
 
-    switch (codec->type) {
+    switch (st->codec->codec_type) {
     case AVMEDIA_TYPE_VIDEO:
         prefix  = 'v';
         flags  |= AV_OPT_FLAG_VIDEO_PARAM;



More information about the ffmpeg-cvslog mailing list