1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 01:52:19 +00:00

demux_mkv: support E-AC-3 audio

Recognize "A_EAC3" CodecID.
This commit is contained in:
Uoti Urpala 2011-03-31 02:20:02 +03:00
parent cb4394aea3
commit 993bc6a83f
2 changed files with 4 additions and 0 deletions

View File

@ -1317,6 +1317,8 @@ static int demux_mkv_open_audio(demuxer_t *demuxer, mkv_track_t *track,
track->a_formattag = 0x0055;
else if (!strncmp(track->codec_id, MKV_A_AC3, strlen(MKV_A_AC3)))
track->a_formattag = 0x2000;
else if (!strncmp(track->codec_id, MKV_A_EAC3, strlen(MKV_A_EAC3)))
track->a_formattag = mmioFOURCC('E', 'A', 'C', '3');
else if (!strcmp(track->codec_id, MKV_A_DTS))
track->a_formattag = 0x2001;
else if (!strcmp(track->codec_id, MKV_A_PCM)
@ -1390,6 +1392,7 @@ static int demux_mkv_open_audio(demuxer_t *demuxer, mkv_track_t *track,
sh_a->wf->nAvgBytesPerSec = 16000;
sh_a->wf->nBlockAlign = 1152;
} else if ((track->a_formattag == 0x2000) /* AC3 */
|| track->a_formattag == mmioFOURCC('E', 'A', 'C', '3')
|| (track->a_formattag == 0x2001)) { /* DTS */
free(sh_a->wf);
sh_a->wf = NULL;

View File

@ -35,6 +35,7 @@
#define MKV_A_AAC "A_AAC"
#define MKV_A_AC3 "A_AC3"
#define MKV_A_DTS "A_DTS"
#define MKV_A_EAC3 "A_EAC3"
#define MKV_A_MP2 "A_MPEG/L2"
#define MKV_A_MP3 "A_MPEG/L3"
#define MKV_A_PCM "A_PCM/INT/LIT"