diff libmpdemux/demux_mkv.c @ 19154:2895b9807ff3

Native MPEG4 SP/ASP/AP support in Matroska. Patch by Aurelien Jacobs and myself.
author rathann
date Sat, 22 Jul 2006 14:35:49 +0000
parents 07fc09eaab56
children 4e68a3881201
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Sat Jul 22 13:54:33 2006 +0000
+++ b/libmpdemux/demux_mkv.c	Sat Jul 22 14:35:49 2006 +0000
@@ -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');