changeset 13804:5c0fda3b83c3

DTS uses the format tag 0x2001. Patch by Joakim Plate (joakim ! plate () ecce ! se)
author mosu
date Sat, 30 Oct 2004 08:47:04 +0000
parents 0bd7ccf63c54
children ed0b4de9b1b3
files libmpdemux/demux_mkv.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Sat Oct 30 08:42:25 2004 +0000
+++ b/libmpdemux/demux_mkv.c	Sat Oct 30 08:47:04 2004 +0000
@@ -1690,9 +1690,10 @@
       if (!strcmp(track->codec_id, MKV_A_MP3) ||
           !strcmp(track->codec_id, MKV_A_MP2))
         track->a_formattag = 0x0055;
-      else if (!strncmp(track->codec_id, MKV_A_AC3, strlen(MKV_A_AC3)) ||
-               !strcmp(track->codec_id, MKV_A_DTS))
+      else if (!strncmp(track->codec_id, MKV_A_AC3, strlen(MKV_A_AC3)))
         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_PCM) ||
                !strcmp(track->codec_id, MKV_A_PCM_BE))
         track->a_formattag = 0x0001;
@@ -1810,7 +1811,8 @@
       sh_a->wf->nAvgBytesPerSec = 16000;
       sh_a->wf->nBlockAlign = 1152;
     }
-  else if (!strncmp(track->codec_id, MKV_A_AC3, strlen(MKV_A_AC3)))
+  else if ((track->a_formattag == 0x2000) || /* AC3 */
+           (track->a_formattag == 0x2001)) /* DTS */
     {
       sh_a->wf->nAvgBytesPerSec = 16000;
       sh_a->wf->nBlockAlign = 1536;