[MPlayer-dev-eng] [PATCH] native MPEG4 ASP in Matroska

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Fri Jul 21 17:50:07 CEST 2006


incoming/[AnY]_Chevalier_-_01_[XviD][704x400][MP3_2.0][4FCE6D4A].mkv
that needs this patch to recognize video track correctly. File was muxed
with mkvtoolnix 1.7.0, I'm told.

If nobody objects, I'll apply tomorrow.

Regards,
R.

-- 
MPlayer developer and RPMs maintainer: http://rpm.greysector.net/mplayer/
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
--- MPlayer-19134/libmpdemux/matroska.h.mkv	2006-07-17 18:02:34.000000000 +0200
+++ MPlayer-19134/libmpdemux/matroska.h	2006-07-21 17:39:10.000000000 +0200
@@ -48,6 +48,7 @@
 #define MKV_V_QUICKTIME  "V_QUICKTIME"
 #define MKV_V_MPEG1      "V_MPEG1"
 #define MKV_V_MPEG2      "V_MPEG2"
+#define MKV_V_MPEG4_ASP  "V_MPEG4/ISO/ASP"
 #define MKV_V_MPEG4_AVC  "V_MPEG4/ISO/AVC"
 
 #define MKV_S_TEXTASCII  "S_TEXT/ASCII"
--- MPlayer-19134/libmpdemux/demux_mkv.c.mkv	2006-07-17 18:02:34.000000000 +0200
+++ MPlayer-19134/libmpdemux/demux_mkv.c	2006-07-21 17:49:22.000000000 +0200
@@ -1825,6 +1825,17 @@
           bih->biCompression = mmioFOURCC('m', 'p', 'g', '2');
           track->reorder_timecodes = !correct_pts;
         }
+      else if (!strcmp(track->codec_id, MKV_V_MPEG4_ASP))
+        {
+          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');


More information about the MPlayer-dev-eng mailing list