[FFmpeg-cvslog] cmdutils/filter_codec_opts: do not discard all options for CODEC_ID_NONE

Michael Niedermayer git at videolan.org
Fri Mar 28 17:40:39 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Mar 28 16:03:33 2014 +0100| [2b4543ff696893e925a32eac5de2259dff243696] | committer: Michael Niedermayer

cmdutils/filter_codec_opts: do not discard all options for CODEC_ID_NONE

This fixes cases where the codec is detect later than the stream creation
No testcase with unmodified source known

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 cmdutils.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmdutils.c b/cmdutils.c
index dc9bd2c..be3189a 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1942,7 +1942,8 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
             }
 
         if (av_opt_find(&cc, t->key, NULL, flags, AV_OPT_SEARCH_FAKE_OBJ) ||
-            (codec && codec->priv_class &&
+            !codec ||
+            (codec->priv_class &&
              av_opt_find(&codec->priv_class, t->key, NULL, flags,
                          AV_OPT_SEARCH_FAKE_OBJ)))
             av_dict_set(&ret, t->key, t->value, 0);



More information about the ffmpeg-cvslog mailing list