Fix MPEG audio detection problems due to invalid layer 4

This commit is contained in:
Moritz Bunkus 2011-12-07 22:45:45 +01:00
parent b396c0f278
commit 27b60750c2
4 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2011-12-07 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: bug fix: Fixed a rare audio type mis-detection of
MP2/MP3 audio tracks in MPEG program streams causing mkvmerge to
abort with an error message.
2011-12-04 Nils Maier <maierman@web.de>
* mkvmerge, mkvextract: enhancement: Implemented input file

View File

@ -770,7 +770,7 @@ mpeg_ps_reader_c::new_stream_a_mpeg(mpeg_ps_id_t,
decode_mp3_header(buf, &header);
track->a_channels = header.channels;
track->a_sample_rate = header.sampling_frequency;
track->fourcc = FOURCC('M', 'P', '0' + header.layer, ' ');
track->fourcc = FOURCC('M', 'P', '0' + std::max(2, std::min(3, header.layer)), ' ');
}
void

View File

@ -171,3 +171,4 @@ T_322propedit_track_headers:785209f2dc35ad6177bea2ca6e43198f-e19a10295b0635a0581
T_323propedit_segment_info:785209f2dc35ad6177bea2ca6e43198f-2df9da2d502a7d5ad914966c27393844-c65579659de3fb44c74aed6965b5ce2e:passed:20111203-152845:0.320514946
T_324propedit_chapters:785209f2dc35ad6177bea2ca6e43198f-f240df9a576de2cc683e1f4ef0fa6e23-a6d99a5e779aa1c65ba4d03597754d37-88a693fa89e98cf778fb6abad09da08a-2a53e52d0e3b13d37f5e9f411a9e74eb-ca7f40c5103109873741d594e0bd94eb-ee5f4977886284f0d97519895fbab9d8-9f3dfc35e73e1061124b2b208a028e54-11d7efba28fe0cd85b03919dd87324e9-d41d8cd98f00b204e9800998ecf8427e:passed:20111203-154502:0.598148676
T_325propedit_tags:785209f2dc35ad6177bea2ca6e43198f-3f151ff52e43ed1df3c173e5b0c78ee2-e58a5937ac6e0dc71d6c8264c53535be-cde42f3a1204403bd9f825f6c408521e-e58a5937ac6e0dc71d6c8264c53535be-cde42f3a1204403bd9f825f6c408521e-e26ce3a9725c74e16b5be99a5a917ae2-1a6b0e586328c306d63e9d829c85dcbe-8aa2fda41ba5c0cfe6fec3d46611896c-15c4f84c3afd7b158c0c1cd372f898d9-8aa2fda41ba5c0cfe6fec3d46611896c-15c4f84c3afd7b158c0c1cd372f898d9-53f569add0f778e2813ba1f7e7e5a2b6-1e1f38bd64d26e8a38e45c39b8ef2f5b-54597c44d0938662d716edd21e4d6c68-d41d8cd98f00b204e9800998ecf8427e:passed:20111203-160727:1.442408716
T_326mpeg_ps_mpeg_audio_layer4:ff06a9bda2235c9c834ef839344325af:passed:20111207-224511:2.60761265

View File

@ -0,0 +1,13 @@
#!/usr/bin/ruby -w
class T_326mpeg_ps_mpeg_audio_layer4 < Test
def description
"mkvmerge / MPEG PS with MPEG audio layer 4"
end
def run
merge "data/mpeg12/mpeg_audio_layer4.mpg", 1
hash_tmp
end
end