Add Dolby TrueHD support for mkv demuxer.

Patch by Jason Tackaberry, tack urandom ca 


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29513 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
cehoyos 2009-08-13 21:54:08 +00:00
parent 58a12d7901
commit d41e860bab
2 changed files with 5 additions and 1 deletions

View File

@ -1751,6 +1751,8 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track, int aid)
track->a_formattag = mmioFOURCC('Q', 'D', 'M', '2'); track->a_formattag = mmioFOURCC('Q', 'D', 'M', '2');
else if (!strcmp(track->codec_id, MKV_A_WAVPACK)) else if (!strcmp(track->codec_id, MKV_A_WAVPACK))
track->a_formattag = mmioFOURCC('W', 'V', 'P', 'K'); track->a_formattag = mmioFOURCC('W', 'V', 'P', 'K');
else if (!strcmp(track->codec_id, MKV_A_TRUEHD))
track->a_formattag = mmioFOURCC('T', 'R', 'H', 'D');
else if (!strcmp(track->codec_id, MKV_A_FLAC)) else if (!strcmp(track->codec_id, MKV_A_FLAC))
{ {
if (track->private_data == NULL || track->private_size == 0) if (track->private_data == NULL || track->private_size == 0)
@ -1990,7 +1992,8 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track, int aid)
dp->flags = 0; dp->flags = 0;
ds_add_packet (demuxer->audio, dp); ds_add_packet (demuxer->audio, dp);
} }
else if (track->a_formattag == mmioFOURCC('W', 'V', 'P', 'K')) else if (track->a_formattag == mmioFOURCC('W', 'V', 'P', 'K') ||
track->a_formattag == mmioFOURCC('T', 'R', 'H', 'D'))
{ /* do nothing, still works */ } { /* do nothing, still works */ }
else if (!track->ms_compat || (track->private_size < sizeof(WAVEFORMATEX))) else if (!track->ms_compat || (track->private_size < sizeof(WAVEFORMATEX)))
{ {

View File

@ -50,6 +50,7 @@
#define MKV_A_QDMC2 "A_QUICKTIME/QDM2" #define MKV_A_QDMC2 "A_QUICKTIME/QDM2"
#define MKV_A_FLAC "A_FLAC" #define MKV_A_FLAC "A_FLAC"
#define MKV_A_WAVPACK "A_WAVPACK4" #define MKV_A_WAVPACK "A_WAVPACK4"
#define MKV_A_TRUEHD "A_TRUEHD"
#define MKV_V_MSCOMP "V_MS/VFW/FOURCC" #define MKV_V_MSCOMP "V_MS/VFW/FOURCC"
#define MKV_V_REALV10 "V_REAL/RV10" #define MKV_V_REALV10 "V_REAL/RV10"