Mercurial > mplayer.hg
changeset 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 | 8df0a51b0e37 |
children | 188225d6ba3f |
files | libmpdemux/demux_mkv.c libmpdemux/matroska.h |
diffstat | 2 files changed, 16 insertions(+), 0 deletions(-) [+] |
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');
--- a/libmpdemux/matroska.h Sat Jul 22 13:54:33 2006 +0000 +++ b/libmpdemux/matroska.h Sat Jul 22 14:35:49 2006 +0000 @@ -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"