From bf49ec236dfa0080888c8fbf5d127453fff19b2b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Tue, 9 Sep 2008 11:21:40 -0700 Subject: [PATCH] E-AC3 support in mkv files. --- NEWS | 1 + modules/codec/avcodec/fourcc.h | 5 +++++ modules/demux/mkv.cpp | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/NEWS b/NEWS index 5cd8309f0f..2e135daff9 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ Inputs: Decoders: * AES3 (SMPTE 302M) support + * E-AC3 (A/52b) support Stream output: * Restored the old mpeg2 transrating module. diff --git a/modules/codec/avcodec/fourcc.h b/modules/codec/avcodec/fourcc.h index f031449d94..3dc9341694 100644 --- a/modules/codec/avcodec/fourcc.h +++ b/modules/codec/avcodec/fourcc.h @@ -859,6 +859,11 @@ static const struct { VLC_FOURCC('a','5','2','b'), CODEC_ID_AC3, /* VLC specific hack */ AUDIO_ES, "A52 Audio (aka AC3)" }, +#if LIBAVCODEC_VERSION_INT >= ((52<<16)+(0<<8)+0) + { VLC_FOURCC('e','a','c','3'), CODEC_ID_EAC3, + AUDIO_ES, "A/52 B Audio (aka E-AC3)" }, +#endif + /* DTS Audio */ { VLC_FOURCC('d','t','s',' '), CODEC_ID_DTS, AUDIO_ES, "DTS Audio" }, diff --git a/modules/demux/mkv.cpp b/modules/demux/mkv.cpp index 1034cf634b..1596cc13fb 100644 --- a/modules/demux/mkv.cpp +++ b/modules/demux/mkv.cpp @@ -2410,6 +2410,10 @@ bool matroska_segment_c::Select( mtime_t i_start_time ) { tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'a', '5', '2', ' ' ); } + else if( !strcmp( tracks[i_track]->psz_codec, "A_EAC3" ) ) + { + tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'e', 'a', 'c', '3' ); + } else if( !strcmp( tracks[i_track]->psz_codec, "A_DTS" ) ) { tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'd', 't', 's', ' ' );