Copy language tag into output file

This commit is contained in:
Moritz Bunkus 2011-09-15 22:12:04 +02:00
parent 626bd62abd
commit 4dcf6f431b
4 changed files with 19 additions and 3 deletions

View File

@ -218,7 +218,8 @@ mpeg_ts_reader_c::identify() {
continue;
std::vector<std::string> 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)

View File

@ -211,7 +211,6 @@ public:
, a_sample_rate(0)
, a_bits_per_sample(0)
, a_bsid(0)
, language(std::string("und"))
{
}

View File

@ -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

View File

@ -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