mkvtoolnix/tests/test-642avc_es_clear_internal_buffers_after_reading_headers.rb
Moritz Bunkus ee46e1c7ab
AVC/h.264 ES reader: clear parser's buffer after reading the headers
After reading the headers, the file is read again from the
start. Therefore no data must be left in the parser's internal
buffers. That was the intention behind calling `flush()` - but that
isn't actually what flush does. Instead it tries to use the remaining
data in the buffers as a frame.

This is not only wrong, it can also fail and cause an exception to be
thrown. That in turn causes a failure when reading the headers — both
identification and muxing abort at that point.

Fixes #2325.
2018-06-13 17:52:29 +02:00

6 lines
236 B
Ruby
Executable File

#!/usr/bin/ruby -w
# T_642avc_es_clear_internal_buffers_after_reading_headers
describe "mkvmerge / AVC/h.264 identification failure due to remaining data in parser's buffers"
test_merge "data/h264/failure-due-to-internal-buffers.h264"