diff options
author | rathann <rathann@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-22 14:35:49 +0000 |
---|---|---|
committer | rathann <rathann@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-22 14:35:49 +0000 |
commit | 02362913a71839dc15b0d2605601f782ca089ab6 (patch) | |
tree | 40cc963a7366888b9741e09c50eadf8eeb0d47d6 /libmpdemux | |
parent | c4d02071c23d193e20a2ad67092d5fd4dc217422 (diff) |
Native MPEG4 SP/ASP/AP support in Matroska.
Patch by Aurelien Jacobs and myself.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19159 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_mkv.c | 13 | ||||
-rw-r--r-- | libmpdemux/matroska.h | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index d35c1ca0a4..8c29dbb362 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -1825,6 +1825,19 @@ demux_mkv_open_video (demuxer_t *demuxer, mkv_track_t *track) 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'); diff --git a/libmpdemux/matroska.h b/libmpdemux/matroska.h index b416e4f7ac..2246f7dff8 100644 --- a/libmpdemux/matroska.h +++ b/libmpdemux/matroska.h @@ -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" |