[Mplayer-cvslog] CVS: main/libmpdemux demux_mkv.cpp,1.47,1.48

Moritz Bunkus CVS mosu at mplayerhq.hu
Sun Nov 16 20:25:10 CET 2003


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

Modified Files:
	demux_mkv.cpp 
Log Message:
Support for FLAC in Matroska written in the MS compatibility mode.

Index: demux_mkv.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mkv.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- demux_mkv.cpp	16 Nov 2003 12:10:34 -0000	1.47
+++ demux_mkv.cpp	16 Nov 2003 19:24:43 -0000	1.48
@@ -2355,7 +2355,8 @@
 
       track->realmedia = true;
 
-    } else if (!strcmp(track->codec_id, MKV_A_FLAC)) {
+    } else if (!strcmp(track->codec_id, MKV_A_FLAC) ||
+               (track->a_formattag == 0xf1ac)) {
       free(sh_a->wf);
       sh_a->wf = NULL;
 
@@ -2364,8 +2365,16 @@
       dp->pts = 0;
       dp->flags = 0;
       ds_add_packet(demuxer->audio, dp);
-      dp = new_demux_packet(track->private_size);
-      memcpy(dp->buffer, track->private_data, track->private_size);
+      if (track->a_formattag == mmioFOURCC('f', 'L', 'a', 'C')) {
+        dp = new_demux_packet(track->private_size);
+        memcpy(dp->buffer, track->private_data, track->private_size);
+      } else {
+        sh_a->format = mmioFOURCC('f', 'L', 'a', 'C');
+        dp = new_demux_packet(track->private_size - sizeof(WAVEFORMATEX));
+        memcpy(dp->buffer, (unsigned char *)track->private_data +
+               sizeof(WAVEFORMATEX), track->private_size -
+               sizeof(WAVEFORMATEX));
+      }
       dp->pts = 0;
       dp->flags = 0;
       ds_add_packet(demuxer->audio, dp);



More information about the MPlayer-cvslog mailing list