From d8620c01dcc7e766d1d75289fe9795023e11f048 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 23 Feb 2015 22:25:08 +0100 Subject: [PATCH] MPEG TS reader: recognize AC3, DTS in MPEG TS with types 0xa1, 0xa2 Fixes #1126. --- ChangeLog | 4 ++++ src/input/r_mpeg_ts.cpp | 2 ++ src/input/r_mpeg_ts.h | 2 ++ tests/results.txt | 1 + tests/test-467mpeg_ts_eac3_type_0xa1.rb | 6 ++++++ 5 files changed, 15 insertions(+) create mode 100755 tests/test-467mpeg_ts_eac3_type_0xa1.rb diff --git a/ChangeLog b/ChangeLog index 52630bb41..7681a3f6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ 2015-02-23 Moritz Bunkus + * mkvmerge: bug fix: Fixed recognition of E-AC3 audio tracks + in MPEG transport streams if they use the type ID 0xa1 (and the + same for DTS tracks stored with type ID 0xa2). Fixes #1126. + * mkvextract: bug fix: Fixed VobSubs being written to the wrong directory if the output file name given by the user didn't have an extension but one of the directories contained a dot. Fixes #1124. diff --git a/src/input/r_mpeg_ts.cpp b/src/input/r_mpeg_ts.cpp index b54b7ce33..4023ee102 100644 --- a/src/input/r_mpeg_ts.cpp +++ b/src/input/r_mpeg_ts.cpp @@ -1034,12 +1034,14 @@ mpeg_ts_reader_c::parse_pmt(unsigned char *pmt) { case STREAM_AUDIO_AC3: case STREAM_AUDIO_AC3_PLUS: // EAC3 + case STREAM_AUDIO_AC3_PLUS2: // EAC3 secondary stream track->type = ES_AUDIO_TYPE; track->codec = codec_c::look_up(codec_c::A_AC3); break; case STREAM_AUDIO_DTS: case STREAM_AUDIO_DTS_HD: case STREAM_AUDIO_DTS_HD_MA: + case STREAM_AUDIO_DTS_HD2: track->type = ES_AUDIO_TYPE; track->codec = codec_c::look_up(codec_c::A_DTS); break; diff --git a/src/input/r_mpeg_ts.h b/src/input/r_mpeg_ts.h index 3d3d582b3..e05c7d2a1 100644 --- a/src/input/r_mpeg_ts.h +++ b/src/input/r_mpeg_ts.h @@ -65,6 +65,8 @@ enum mpeg_ts_stream_type_e { STREAM_AUDIO_AC3_PLUS = 0x84, // Audio AC3 - Dolby Digital Plus (EAC3) STREAM_AUDIO_DTS_HD = 0x85, // Audio DTS HD STREAM_AUDIO_DTS_HD_MA = 0x86, // Audio DTS HD Master Audio + STREAM_AUDIO_AC3_PLUS2 = 0xa1, // Audio AC3 - Dolby Digital Plus (EAC3); secondary stream + STREAM_AUDIO_DTS_HD2 = 0xa2, // Audio DTS HD Express; secondary stream STREAM_VIDEO_VC1 = 0xEA, // Video VC-1 STREAM_SUBTITLES_HDMV_PGS = 0x90, // HDMV PGS subtitles }; diff --git a/tests/results.txt b/tests/results.txt index b807fbb6b..ac78a5f0c 100644 --- a/tests/results.txt +++ b/tests/results.txt @@ -312,3 +312,4 @@ T_463a_ms_acm_with_track_tags:7766fe047ed88b8561caa4fba7c40ea6-45aa68321f4c3785d T_464mp4_mp3_track_sampling_rate_0:51ec17a6dcfae5d8ac0f5fcf44e31eb6-b2c1dca03505c75c694c0de113a450f6:passed:20150223-190257:0.939161518 T_465propedit_gaps_of_130_bytes:aaee6a36641e36dc3976c9e505b645da:passed:20150223-210006:0.085134008 T_466mkvextract_avi_8bpp:9d8a3a19c80c395ae3efe0ba8c66c2f2:passed:20150223-213412:0.034601052 +T_467mpeg_ts_eac3_type_0xa1:6c97721782afd53bc41776abf2d7f445:passed:20150223-221854:0.595330952 diff --git a/tests/test-467mpeg_ts_eac3_type_0xa1.rb b/tests/test-467mpeg_ts_eac3_type_0xa1.rb new file mode 100755 index 000000000..d9964935d --- /dev/null +++ b/tests/test-467mpeg_ts_eac3_type_0xa1.rb @@ -0,0 +1,6 @@ +#!/usr/bin/ruby -w + +# T_467mpeg_ts_eac3_type_0xa1 +describe "mkvmerge / MPEG TS, E-AC3 with type 0xa1" + +test_merge "data/ts/eac3-type-0xa1.m2ts"