Hi,

Attached patch fixes the MKV muxer when trying to write Void elements that
have a size < 10. The current code subtracts 1 from the size, which
accounts for the element ID byte, but it doesn't account for the additional
size byte. This causes the Void element to take up 1 more byte than
intended, which will corrupt the file.

A simple example to reproduce the issue:

$ ffmpeg -f lavfi -i testsrc -vframes 1 -reserve_index_space 38 test.webm
$ mkvinfo test.webm
[...]
test.webm: Error in the Matroska file structure at position 479. Resyncing
to the next level 1 element.
Resync failed: no valid Matroska level 1 element found.

Attachment: 0001-avformat-matroskaenc-fix-Voids-with-size-10.patch
Description: Binary data

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to