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

conrad subversion
Wed Sep 5 02:25:54 CEST 2007


Author: conrad
Date: Wed Sep  5 02:25:54 2007
New Revision: 10380

Log:
Match the behaviour betwen the bmp and wav codec tag lookups


Modified:
   trunk/libavformat/matroskaenc.c

Modified: trunk/libavformat/matroskaenc.c
==============================================================================
--- trunk/libavformat/matroskaenc.c	(original)
+++ trunk/libavformat/matroskaenc.c	Wed Sep  5 02:25:54 2007
@@ -483,10 +483,15 @@ static int mkv_write_codecprivate(ByteIO
     } else if (codec->codec_type == CODEC_TYPE_VIDEO) {
         if (!codec->codec_tag)
             codec->codec_tag = codec_get_tag(codec_bmp_tags, codec->codec_id);
+        if (!codec->codec_tag) {
+            av_log(codec, AV_LOG_ERROR, "no bmp codec id found");
+            ret = -1;
+        }
 
         put_bmp_header(&dyn_cp, codec, codec_bmp_tags, 0);
 
     } else if (codec->codec_type == CODEC_TYPE_AUDIO) {
+        if (!codec->codec_tag)
         codec->codec_tag = codec_get_tag(codec_wav_tags, codec->codec_id);
         if (!codec->codec_tag) {
             av_log(codec, AV_LOG_ERROR, "no wav codec id found");




More information about the ffmpeg-cvslog mailing list