changeset 14458:6e5956958746

Support for AVC in Matroska.
author mosu
date Tue, 11 Jan 2005 08:30:56 +0000
parents 65544ac80ce5
children 54cdb2a85a86
files libmpdemux/demux_mkv.c libmpdemux/matroska.h
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Mon Jan 10 22:25:39 2005 +0000
+++ b/libmpdemux/demux_mkv.c	Tue Jan 11 08:30:56 2005 +0000
@@ -1673,6 +1673,17 @@
           bih->biCompression = mmioFOURCC('m', 'p', 'g', '2');
           track->reorder_timecodes = 1;
         }
+      else if (!strcmp(track->codec_id, MKV_V_MPEG4_AVC))
+        {
+          bih->biCompression = mmioFOURCC('a', 'v', 'c', '1');
+          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 = 1;
+        }
       else
         {
           mp_msg (MSGT_DEMUX,MSGL_WARN,"[mkv] Unknown/unsupported CodecID "
--- a/libmpdemux/matroska.h	Mon Jan 10 22:25:39 2005 +0000
+++ b/libmpdemux/matroska.h	Tue Jan 11 08:30:56 2005 +0000
@@ -47,6 +47,7 @@
 #define MKV_V_QUICKTIME  "V_QUICKTIME"
 #define MKV_V_MPEG1      "V_MPEG1"
 #define MKV_V_MPEG2      "V_MPEG2"
+#define MKV_V_MPEG4_AVC  "V_MPEG4/ISO/AVC"
 
 #define MKV_S_TEXTASCII  "S_TEXT/ASCII"
 #define MKV_S_TEXTUTF8   "S_TEXT/UTF8"