[MPlayer-dev-eng] [PATCH]Allow decoding EAC-3 in matroska with demuxer mkv

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Mar 23 10:56:18 CET 2011


Hi!

Is anybody against this change?

Carl Eugen
-------------- next part --------------
Index: libmpdemux/matroska.h
===================================================================
--- libmpdemux/matroska.h	(revision 33094)
+++ libmpdemux/matroska.h	(working copy)
@@ -35,6 +35,7 @@
 #define MKV_A_AAC        "A_AAC"
 #define MKV_A_AC3        "A_AC3"
 #define MKV_A_DTS        "A_DTS"
+#define MKV_A_EAC3       "A_EAC3"
 #define MKV_A_MP2        "A_MPEG/L2"
 #define MKV_A_MP3        "A_MPEG/L3"
 #define MKV_A_PCM        "A_PCM/INT/LIT"
Index: libmpdemux/demux_mkv.c
===================================================================
--- libmpdemux/demux_mkv.c	(revision 33094)
+++ libmpdemux/demux_mkv.c	(working copy)
@@ -1677,6 +1677,8 @@
             track->a_formattag = 0x2000;
         else if (!strcmp(track->codec_id, MKV_A_DTS))
             track->a_formattag = 0x2001;
+        else if (!strcmp(track->codec_id, MKV_A_EAC3))
+            track->a_formattag = mmioFOURCC('E', 'A', 'C', '3');
         else if (!strcmp(track->codec_id, MKV_A_PCM)
                  || !strcmp(track->codec_id, MKV_A_PCM_BE))
             track->a_formattag = 0x0001;
@@ -1746,6 +1748,7 @@
         sh_a->wf->nAvgBytesPerSec = 16000;
         sh_a->wf->nBlockAlign = 1152;
     } else if ((track->a_formattag == 0x2000) ||        /* AC3 */
+               (track->a_formattag == mmioFOURCC('E', 'A', 'C', '3')) ||
                (track->a_formattag == 0x2001)) {        /* DTS */
         free(sh_a->wf);
         sh_a->wf = NULL;


More information about the MPlayer-dev-eng mailing list