mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-29 06:15:24 +00:00
AC3 parsing: consider frame size 0 an error during header decoding
This commit is contained in:
parent
b01bb3f7f2
commit
f658ca7c8c
@ -1,3 +1,9 @@
|
||||
2013-12-30 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: bug fix: Improved the AC3 header decoding error
|
||||
handling so that the AC3 parsing routines won't get stuck in
|
||||
endless loops when encountering certain garbage data patterns.
|
||||
|
||||
2013-12-29 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: enhancement: unified codec names output by mkvmerge's
|
||||
|
@ -94,6 +94,9 @@ ac3::frame_c::decode_header_type_eac3(bit_reader_c &bc) {
|
||||
m_sub_stream_id = bc.get_bits(3);
|
||||
m_bytes = (bc.get_bits(11) + 1) << 1;
|
||||
|
||||
if (!m_bytes)
|
||||
return false;
|
||||
|
||||
uint8_t fscod = bc.get_bits(2);
|
||||
uint8_t fscod2 = bc.get_bits(2);
|
||||
|
||||
@ -185,7 +188,7 @@ ac3::frame_c::decode_header_type_ac3(bit_reader_c &bc) {
|
||||
m_samples = 1536;
|
||||
m_frame_type = EAC3_FRAME_TYPE_INDEPENDENT;
|
||||
|
||||
return true;
|
||||
return m_bytes != 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user