changeset 24805:ee9619105e90

add support for wavpack into matroska
author aurel
date Sun, 21 Oct 2007 22:57:42 +0000
parents a677b0782371
children 982a017a901f
files libmpdemux/demux_mkv.c libmpdemux/matroska.h
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Sun Oct 21 22:31:22 2007 +0000
+++ b/libmpdemux/demux_mkv.c	Sun Oct 21 22:57:42 2007 +0000
@@ -1966,6 +1966,8 @@
         track->a_formattag = mmioFOURCC('Q', 'D', 'M', 'C');
       else if (!strcmp(track->codec_id, MKV_A_QDMC2))
         track->a_formattag = mmioFOURCC('Q', 'D', 'M', '2');
+      else if (!strcmp(track->codec_id, MKV_A_WAVPACK))
+        track->a_formattag = mmioFOURCC('W', 'V', 'P', 'K');
       else if (!strcmp(track->codec_id, MKV_A_FLAC))
         {
           if (track->private_data == NULL || track->private_size == 0)
@@ -2205,6 +2207,8 @@
       dp->flags = 0;
       ds_add_packet (demuxer->audio, dp);
     }
+  else if (track->a_formattag == mmioFOURCC('W', 'V', 'P', 'K'))
+    {  /* do nothing, still works */  }
   else if (!track->ms_compat || (track->private_size < sizeof(WAVEFORMATEX)))
     {
       free_sh_audio(demuxer, track->tnum);
--- a/libmpdemux/matroska.h	Sun Oct 21 22:31:22 2007 +0000
+++ b/libmpdemux/matroska.h	Sun Oct 21 22:57:42 2007 +0000
@@ -33,6 +33,7 @@
 #define MKV_A_QDMC       "A_QUICKTIME/QDMC"
 #define MKV_A_QDMC2      "A_QUICKTIME/QDM2"
 #define MKV_A_FLAC       "A_FLAC"
+#define MKV_A_WAVPACK    "A_WAVPACK4"
 
 #define MKV_V_MSCOMP     "V_MS/VFW/FOURCC"
 #define MKV_V_REALV10    "V_REAL/RV10"