[Mplayer-cvslog] CVS: main/libmpdemux demux_mkv.cpp,1.38,1.39 matroska.h,1.8,1.9

Moritz Bunkus CVS mosu at mplayerhq.hu
Fri Oct 17 00:02:10 CEST 2003


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv24478

Modified Files:
	demux_mkv.cpp matroska.h 
Log Message:
Support for MP2 audio.

Index: demux_mkv.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mkv.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- demux_mkv.cpp	16 Oct 2003 21:10:18 -0000	1.38
+++ demux_mkv.cpp	16 Oct 2003 22:01:30 -0000	1.39
@@ -784,7 +784,8 @@
             t->a_formattag = get_uint16(&wfe->wFormatTag);
           }
         } else {
-          if (!strcmp(t->codec_id, MKV_A_MP3))
+          if (!strcmp(t->codec_id, MKV_A_MP3) ||
+              !strcmp(t->codec_id, MKV_A_MP2))
             t->a_formattag = 0x0055;
           else if (!strncmp(t->codec_id, MKV_A_AC3, strlen(MKV_A_AC3)))
             t->a_formattag = 0x2000;
@@ -1836,7 +1837,8 @@
     sh_a->samplerate = (uint32_t)track->a_sfreq;
     sh_a->wf->nSamplesPerSec = (uint32_t)track->a_sfreq;
     sh_a->samplesize = track->a_bps / 8;
-    if (!strcmp(track->codec_id, MKV_A_MP3)) {
+    if (!strcmp(track->codec_id, MKV_A_MP3) ||
+        !strcmp(track->codec_id, MKV_A_MP2)) {
       sh_a->wf->nAvgBytesPerSec = 16000;
       sh_a->wf->nBlockAlign = 1152;
       sh_a->wf->wBitsPerSample = 0;

Index: matroska.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/matroska.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- matroska.h	16 Oct 2003 21:06:43 -0000	1.8
+++ matroska.h	16 Oct 2003 22:01:30 -0000	1.9
@@ -17,6 +17,7 @@
 #define MKV_A_AAC_4SBR   "A_AAC/MPEG4/SBR"
 #define MKV_A_AC3        "A_AC3"
 #define MKV_A_DTS        "A_DTS"
+#define MKV_A_MP2        "A_MPEG/L2"
 #define MKV_A_MP3        "A_MPEG/L3"
 #define MKV_A_PCM        "A_PCM/INT/LIT"
 #define MKV_A_PCM_BE     "A_PCM/INT/BIG"



More information about the MPlayer-cvslog mailing list