[MPlayer-cvslog] r19159 - in trunk/libmpdemux: demux_mkv.c matroska.h

rathann subversion at mplayerhq.hu
Sat Jul 22 16:35:50 CEST 2006


Author: rathann
Date: Sat Jul 22 16:35:49 2006
New Revision: 19159

Modified:
   trunk/libmpdemux/demux_mkv.c
   trunk/libmpdemux/matroska.h

Log:
Native MPEG4 SP/ASP/AP support in Matroska.
Patch by Aurelien Jacobs and myself.


Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c	(original)
+++ trunk/libmpdemux/demux_mkv.c	Sat Jul 22 16:35:49 2006
@@ -1825,6 +1825,19 @@
           bih->biCompression = mmioFOURCC('m', 'p', 'g', '2');
           track->reorder_timecodes = !correct_pts;
         }
+      else if (!strcmp(track->codec_id, MKV_V_MPEG4_SP) ||
+               !strcmp(track->codec_id, MKV_V_MPEG4_ASP) ||
+               !strcmp(track->codec_id, MKV_V_MPEG4_AP))
+        {
+          bih->biCompression = mmioFOURCC('m', 'p', '4', 'v');
+          if (track->private_data && (track->private_size > 0))
+            {
+              bih->biSize += track->private_size;
+              bih = (BITMAPINFOHEADER *) realloc (bih, bih->biSize);
+              memcpy (bih + 1, track->private_data, track->private_size);
+            }
+          track->reorder_timecodes = !correct_pts;
+        }
       else if (!strcmp(track->codec_id, MKV_V_MPEG4_AVC))
         {
           bih->biCompression = mmioFOURCC('a', 'v', 'c', '1');

Modified: trunk/libmpdemux/matroska.h
==============================================================================
--- trunk/libmpdemux/matroska.h	(original)
+++ trunk/libmpdemux/matroska.h	Sat Jul 22 16:35:49 2006
@@ -48,6 +48,9 @@
 #define MKV_V_QUICKTIME  "V_QUICKTIME"
 #define MKV_V_MPEG1      "V_MPEG1"
 #define MKV_V_MPEG2      "V_MPEG2"
+#define MKV_V_MPEG4_SP   "V_MPEG4/ISO/SP"
+#define MKV_V_MPEG4_ASP  "V_MPEG4/ISO/ASP"
+#define MKV_V_MPEG4_AP   "V_MPEG4/ISO/AP"
 #define MKV_V_MPEG4_AVC  "V_MPEG4/ISO/AVC"
 
 #define MKV_S_TEXTASCII  "S_TEXT/ASCII"



More information about the MPlayer-cvslog mailing list