diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-08-08 16:25:39 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-08-10 23:56:35 +0200 |
commit | d53acf452f609b1235839ddb3d39ea377a965814 (patch) | |
tree | 3ea94f4eb2dde178967b646c1d9415ee7f9b56af /tests/ref/lavf-fate | |
parent | 59cb099478ee5293c7f3c00b3e2836e1f000f243 (diff) | |
download | ffmpeg-d53acf452f609b1235839ddb3d39ea377a965814.tar.gz |
avformat/matroskaenc: Don't write \0 unnecessarily
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>
Diffstat (limited to 'tests/ref/lavf-fate')
-rw-r--r-- | tests/ref/lavf-fate/av1.mkv | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ref/lavf-fate/av1.mkv b/tests/ref/lavf-fate/av1.mkv index 685fd70811..84924fe05c 100644 --- a/tests/ref/lavf-fate/av1.mkv +++ b/tests/ref/lavf-fate/av1.mkv @@ -1,3 +1,3 @@ -279268e8d6ffcc2299e725a756bbb1a0 *tests/data/lavf-fate/lavf.av1.mkv -55657 tests/data/lavf-fate/lavf.av1.mkv +ba198efa114b4db3c9f772728f84978b *tests/data/lavf-fate/lavf.av1.mkv +55656 tests/data/lavf-fate/lavf.av1.mkv tests/data/lavf-fate/lavf.av1.mkv CRC=0x7c27cc15 |