[FFmpeg-cvslog] r22669 - trunk/libavformat/matroskaenc.c

jai_menon subversion
Thu Mar 25 15:34:19 CET 2010


Author: jai_menon
Date: Thu Mar 25 15:34:19 2010
New Revision: 22669

Log:
Matroska muxer : Don't create audio tracks for unsupported audio codecs.

Modified:
   trunk/libavformat/matroskaenc.c

Modified: trunk/libavformat/matroskaenc.c
==============================================================================
--- trunk/libavformat/matroskaenc.c	Thu Mar 25 15:01:38 2010	(r22668)
+++ trunk/libavformat/matroskaenc.c	Thu Mar 25 15:34:19 2010	(r22669)
@@ -493,12 +493,14 @@ static int mkv_write_codecprivate(AVForm
         }
 
     } else if (codec->codec_type == CODEC_TYPE_AUDIO) {
-        if (!codec->codec_tag)
-            codec->codec_tag = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
-        if (!codec->codec_tag) {
+        unsigned int tag;
+        tag = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
+        if (!tag) {
             av_log(s, AV_LOG_ERROR, "No wav codec ID found.\n");
             ret = -1;
         }
+        if (!codec->codec_tag)
+            codec->codec_tag = tag;
 
         ff_put_wav_header(dyn_cp, codec);
     }



More information about the ffmpeg-cvslog mailing list