mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-26 08:22:31 +00:00
Ignore potential AC3 packets with invalid size fields
Fix for bug 723.
This commit is contained in:
parent
0b1d795883
commit
52e478f2b6
@ -1,3 +1,9 @@
|
||||
2012-03-05 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: bug fix: Sometimes non-AC3 files were mistakenly for
|
||||
AC3 after the re-write of the AC3 handling code on
|
||||
2012-02-26. This has been rectified. Fix for bug 723.
|
||||
|
||||
2012-03-04 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: enhancement: mkvmerge will keep the "enabled" track
|
||||
|
@ -367,6 +367,11 @@ ac3::parser_c::find_consecutive_frames(unsigned char const *buffer,
|
||||
if (!current_frame.decode_header(&buffer[offset], buffer_size - offset))
|
||||
break;
|
||||
|
||||
if (8 > current_frame.m_bytes) {
|
||||
mxdebug_if(debug, boost::format("Current frame at %1% has invalid size %2%\n") % offset % current_frame.m_bytes);
|
||||
break;
|
||||
}
|
||||
|
||||
if ( (current_frame.m_bs_id != first_frame.m_bs_id)
|
||||
&& (current_frame.m_channels != first_frame.m_channels)
|
||||
&& (current_frame.m_sample_rate != first_frame.m_sample_rate)) {
|
||||
|
@ -191,3 +191,4 @@ T_342m2ts_interlaced_h264_from_arte:8c4d727aa228e4738c598e3ddc9d4571:passed:2012
|
||||
T_343m2ts_interlaced_h264_match_of_the_day:fdab49f2f33981826793bb66aab97ca5:passed:20120304-171453:2.873804415
|
||||
T_344microdvd_recognition:ok:passed:20120304-175209:0.082792556
|
||||
T_345flag_enabled:efe07b85cd349a040ed79402256bd6ea-89e9b90881c73d55ac4eda07e20effe5:passed:20120304-181150:0.135757829
|
||||
T_347h264_misdetected_as_ac3:4dcd5541b962ce1d534e04481deadbec:passed:20120305-160017:2.617159557
|
||||
|
6
tests/test-347h264_misdetected_as_ac3.rb
Normal file
6
tests/test-347h264_misdetected_as_ac3.rb
Normal file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/ruby -w
|
||||
|
||||
# T_347h264_misdetected_as_ac3
|
||||
describe "mkvmerge / h264 misdetected as AC3, bug 723"
|
||||
|
||||
test_identify "data/h264/misdetected-as-ac3-bug-723.h264"
|
Loading…
Reference in New Issue
Block a user