diff --git a/src/input/r_mpeg_ts.cpp b/src/input/r_mpeg_ts.cpp index e6d5a0291..ce9dfefd4 100644 --- a/src/input/r_mpeg_ts.cpp +++ b/src/input/r_mpeg_ts.cpp @@ -218,7 +218,8 @@ mpeg_ts_reader_c::identify() { continue; std::vector verbose_info; - verbose_info.push_back((boost::format("language:%1%") % escape(track->language)).str()); + if (!track->language.empty()) + verbose_info.push_back((boost::format("language:%1%") % escape(track->language)).str()); id_result_track(i, ES_AUDIO_TYPE == track->type ? ID_RESULT_TRACK_AUDIO : ID_RESULT_TRACK_VIDEO, fourcc, verbose_info); } @@ -950,7 +951,9 @@ mpeg_ts_reader_c::create_packetizer(int64_t id) { if ((0 == track->ptzr) || !demuxing_requested(type, id)) return; - m_ti.m_id = id; + m_ti.m_id = id; + m_ti.m_language = track->language; + if (ES_AUDIO_TYPE == track->type) { if ( (FOURCC('M', 'P', '1', ' ') == track->fourcc) || (FOURCC('M', 'P', '2', ' ') == track->fourcc) diff --git a/src/input/r_mpeg_ts.h b/src/input/r_mpeg_ts.h index 107bbcc98..0504d1324 100644 --- a/src/input/r_mpeg_ts.h +++ b/src/input/r_mpeg_ts.h @@ -211,7 +211,6 @@ public: , a_sample_rate(0) , a_bits_per_sample(0) , a_bsid(0) - , language(std::string("und")) { } diff --git a/tests/results.txt b/tests/results.txt index 1b56eeea1..12ed8b8be 100644 --- a/tests/results.txt +++ b/tests/results.txt @@ -144,3 +144,4 @@ T_294vobsub_negative_delay:6e1c59551b7ad05fa570bed2ffc926fe:passed:20110523-2048 T_295vc1_rederiving_frame_types:b44ddb45845f897b986582c112e9ef1e-9864da369d9cb828ad428bb7e35a0f80:passed:20110525-205715:8.761058959 T_296video_frames_duration_0:5799836e2ff0742618d34a3e817f4c23:passed:20110709-143914:0.458765384 T_297mpeg_transport_streams:b956dc6208a6c34759b31be7c2a08ecb-7b7170e320bfffe10738f06a7d2bcf44:passed:20110913-112636:10.706480253 +T_298ts_language:eaa94512f6b9062a8361f2d81927cd35:new:20110915-221140:10.526064317 diff --git a/tests/test-298ts_language.rb b/tests/test-298ts_language.rb new file mode 100644 index 000000000..c9585dadb --- /dev/null +++ b/tests/test-298ts_language.rb @@ -0,0 +1,13 @@ +#!/usr/bin/ruby -w + +class T_298ts_language < Test + def description + "mkvmerge / MPEG transport streams: language tags" + end + + def run + merge "data/ts/blue_planet.ts" + hash_tmp + end +end +