mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-12 19:18:44 +02:00
d53acf452f
Writing the duration SimpleTag is special: It's size is reserved in advance via an EBML Void element (if seekable) and this reserved space is overwritten when writing the trailer; it does not use put_ebml_string(). The string to write is created via snprintf on a buffer of size 20; this buffer is then written via put_ebml_binary() with a size of 20. EBML strings need not be zero-terminated; if not, they are implicitly terminated by the element's length field. snprintf() always zero-terminates the buffer, i.e. the last byte can be discarded when using an EBML string. This patch does this. The FATE changes are as expected: One byte saved for every track; the only exception is the matroska-qt-mode test: An additional byte is saved because an additional byte could be saved from the enclosing Tags length field. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
11 lines
444 B
Plaintext
11 lines
444 B
Plaintext
451a43f61da7baee559005881d94203e *tests/data/fate/matroska-zero-length-block.matroska
|
|
633 tests/data/fate/matroska-zero-length-block.matroska
|
|
#tb 0: 1/1000
|
|
#media_type 0: subtitle
|
|
#codec_id 0: subrip
|
|
0, 1000, 1000, 2000, 5, 0x05b801df
|
|
0, 3300, 3300, 3700, 16, 0x300705b2
|
|
[STREAM]
|
|
TAG:DESCRIPTION=This track uses header removal compression and has a Block of size zero before reversing it.
|
|
[/STREAM]
|