changeset 3687:494a55f131f3 libavformat

matroska: expand useless define for MS compat codec id strings
author aurel
date Tue, 05 Aug 2008 00:42:49 +0000
parents 03df0b5927ff
children eb4649280c36
files matroska.h matroskadec.c matroskaenc.c
diffstat 3 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/matroska.h	Tue Aug 05 00:42:46 2008 +0000
+++ b/matroska.h	Tue Aug 05 00:42:49 2008 +0000
@@ -203,9 +203,6 @@
     enum CodecID id;
 }CodecMime;
 
-#define MATROSKA_CODEC_ID_VIDEO_VFW_FOURCC   "V_MS/VFW/FOURCC"
-#define MATROSKA_CODEC_ID_AUDIO_ACM          "A_MS/ACM"
-
 /* max. depth in the EBML tree structure */
 #define EBML_MAX_DEPTH 16
 
--- a/matroskadec.c	Tue Aug 05 00:42:46 2008 +0000
+++ b/matroskadec.c	Tue Aug 05 00:42:49 2008 +0000
@@ -1138,12 +1138,12 @@
         if (st == NULL)
             return AVERROR(ENOMEM);
 
-        if (!strcmp(track->codec_id, MATROSKA_CODEC_ID_VIDEO_VFW_FOURCC)
+        if (!strcmp(track->codec_id, "V_MS/VFW/FOURCC")
             && track->codec_priv.size >= 40
             && track->codec_priv.data != NULL) {
             track->video.fourcc = AV_RL32(track->codec_priv.data + 16);
             codec_id = codec_get_id(codec_bmp_tags, track->video.fourcc);
-        } else if (!strcmp(track->codec_id, MATROSKA_CODEC_ID_AUDIO_ACM)
+        } else if (!strcmp(track->codec_id, "A_MS/ACM")
                    && track->codec_priv.size >= 18
                    && track->codec_priv.data != NULL) {
             uint16_t tag = AV_RL16(track->codec_priv.data);
--- a/matroskaenc.c	Tue Aug 05 00:42:46 2008 +0000
+++ b/matroskaenc.c	Tue Aug 05 00:42:49 2008 +0000
@@ -587,7 +587,7 @@
                     put_ebml_string(pb, MATROSKA_ID_CODECID, "V_QUICKTIME");
                 else if (!native_id)
                     // if there is no mkv-specific codec ID, use VFW mode
-                    put_ebml_string(pb, MATROSKA_ID_CODECID, MATROSKA_CODEC_ID_VIDEO_VFW_FOURCC);
+                    put_ebml_string(pb, MATROSKA_ID_CODECID, "V_MS/VFW/FOURCC");
 
                 subinfo = start_ebml_master(pb, MATROSKA_ID_TRACKVIDEO, 0);
                 // XXX: interlace flag?
@@ -607,7 +607,7 @@
 
                 if (!native_id)
                     // no mkv-specific ID, use ACM mode
-                    put_ebml_string(pb, MATROSKA_ID_CODECID, MATROSKA_CODEC_ID_AUDIO_ACM);
+                    put_ebml_string(pb, MATROSKA_ID_CODECID, "A_MS/ACM");
 
                 subinfo = start_ebml_master(pb, MATROSKA_ID_TRACKAUDIO, 0);
                 put_ebml_uint  (pb, MATROSKA_ID_AUDIOCHANNELS    , codec->channels);