From f981aa7c44070502a9a36535a47cae377680510c Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 13 Apr 2015 21:18:20 +0200 Subject: [PATCH] TrueHD reader: assign correct track ID to embedded AC3 track Fixes #1158. --- ChangeLog | 4 ++++ src/input/r_truehd.cpp | 2 ++ tests/results.txt | 2 ++ .../test-492truehd_ac3_setting_track_properties.rb | 13 +++++++++++++ ...93truehd_ac3_setting_track_properties_mpeg_ts.rb | 13 +++++++++++++ 5 files changed, 34 insertions(+) create mode 100755 tests/test-492truehd_ac3_setting_track_properties.rb create mode 100755 tests/test-493truehd_ac3_setting_track_properties_mpeg_ts.rb diff --git a/ChangeLog b/ChangeLog index 7f2d2a444..eaf3c5e4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2015-04-13 Moritz Bunkus + * mkvmerge: bug fix: fixed specifying track properties like + language or name for AC3 cores embedded in TrueHD tracks when + they're read from raw thd+ac3 files. Fixes #1158. + * mkvmerge: enhancement for MPEG program stream handling: mkvmerge will only look for additional files automatically if the source file begins with »VTS_…« and just if it ends in a diff --git a/src/input/r_truehd.cpp b/src/input/r_truehd.cpp index e346e7f97..6e93c75d7 100644 --- a/src/input/r_truehd.cpp +++ b/src/input/r_truehd.cpp @@ -119,6 +119,8 @@ truehd_reader_c::create_packetizer(int64_t tid) { if (!demuxing_requested('a', tid)) return; + m_ti.m_id = tid; + if (0 == tid) { m_truehd_ptzr = add_packetizer(new truehd_packetizer_c(this, m_ti, m_header->m_codec, m_header->m_sampling_rate, m_header->m_channels)); show_packetizer_info(0, PTZR(m_truehd_ptzr)); diff --git a/tests/results.txt b/tests/results.txt index fee3b66ff..163fc3079 100644 --- a/tests/results.txt +++ b/tests/results.txt @@ -337,3 +337,5 @@ T_488hevc_conformance_window_with_cropping:71d84f56384c2d25fe55477766b7604d:pass T_489dts_es:6f9fb5e7a5144060ce4b19ee146bb03a-0770ee503180e4d8cfd57335e684921d-99ccde4d9e7b1cd0ff711edfe9cdad1e:passed:20150403-115948:1.604769748 T_490sequence_numbers_no_0_in_first_gop:10a0cc2f79acd8cb520661b45721e652:passed:20150411-142423:0.832402022 T_491auto_additional_files_only_with_vts_prefix:98fd5ee77c40d1de6244c7afca3cfa15:passed:20150413-202924:0.904251401 +T_492truehd_ac3_setting_track_properties:076b157723cf84fa785130f4f87f15ab-cf8baeb632991b669c172fa96278d11a-5eb0ff15ecb155e7828f6724a60b77d1-ec21ebdd433ed1a6f9d25a337323045b-ab9b806b3de4e93c52e767f925111834-c1644709f2dd31bb03e3555e96ad12f3:new:20150413-211600:0.0 +T_493truehd_ac3_setting_track_properties_mpeg_ts:8256eca144895021b5cf265efaf7bf29-73d08590bcb0d35a81c816a3c74eb116-59203f0671a1a2089f29034551644208-fa84f1b5c95de4ff100ec6d1888c0d7e-e4460272dfdf3e4cdb432d2656cc0a95-da8ae3b777d10ddfca98c131284ab841:new:20150413-211707:16.127728072 diff --git a/tests/test-492truehd_ac3_setting_track_properties.rb b/tests/test-492truehd_ac3_setting_track_properties.rb new file mode 100755 index 000000000..fe8aab738 --- /dev/null +++ b/tests/test-492truehd_ac3_setting_track_properties.rb @@ -0,0 +1,13 @@ +#!/usr/bin/ruby -w + +# T_492truehd_ac3_setting_track_properties +describe "mkvmerge / setting track properties for AC3 cores embedded in TrueHD tracks" + +[ + "--language 0:fre --language 1:ger", + "--language 0:ger --language 1:fre", + "--track-name 0:tricky --track-name 1:tracky", + "--track-name 0:tracky --track-name 1:tricky", + "--track-order 0:0,0:1", + "--track-order 0:1,0:0", +].each { |args| test_merge "data/truehd/blueplanet.thd+ac3", :args => args } diff --git a/tests/test-493truehd_ac3_setting_track_properties_mpeg_ts.rb b/tests/test-493truehd_ac3_setting_track_properties_mpeg_ts.rb new file mode 100755 index 000000000..1c1f7f817 --- /dev/null +++ b/tests/test-493truehd_ac3_setting_track_properties_mpeg_ts.rb @@ -0,0 +1,13 @@ +#!/usr/bin/ruby -w + +# T_493truehd_ac3_setting_track_properties_mpeg_ts +describe "mkvmerge / setting track properties for AC3 cores embedded in TrueHD tracks from MPEG TS" + +[ + "--language 2:fre --language 3:ger", + "--language 2:ger --language 3:fre", + "--track-name 2:tricky --track-name 3:tracky", + "--track-name 2:tracky --track-name 3:tricky", + "--track-order 0:2,0:3", + "--track-order 0:3,0:2", +].each { |args| test_merge "data/ts/blue_planet.ts", :args => "--no-video --atracks 2,3 #{args}" }