aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ref/lavf
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-08 16:25:39 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-10 23:56:35 +0200
commitd53acf452f609b1235839ddb3d39ea377a965814 (patch)
tree3ea94f4eb2dde178967b646c1d9415ee7f9b56af /tests/ref/lavf
parent59cb099478ee5293c7f3c00b3e2836e1f000f243 (diff)
downloadffmpeg-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')
-rw-r--r--tests/ref/lavf/mka4
-rw-r--r--tests/ref/lavf/mkv4
-rw-r--r--tests/ref/lavf/mkv_attachment4
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/ref/lavf/mka b/tests/ref/lavf/mka
index 93a0b8f71a..135fade76c 100644
--- a/tests/ref/lavf/mka
+++ b/tests/ref/lavf/mka
@@ -1,3 +1,3 @@
-77db16a9fe1c42a230c85124bfb40cad *tests/data/lavf/lavf.mka
-43573 tests/data/lavf/lavf.mka
+4fede420f36a21bbb3ae4e5d6a884267 *tests/data/lavf/lavf.mka
+43572 tests/data/lavf/lavf.mka
tests/data/lavf/lavf.mka CRC=0x3a1da17e
diff --git a/tests/ref/lavf/mkv b/tests/ref/lavf/mkv
index 8ddc9cf57f..1b25aea6aa 100644
--- a/tests/ref/lavf/mkv
+++ b/tests/ref/lavf/mkv
@@ -1,3 +1,3 @@
-05889ab61cc6144018c80e50c781fe44 *tests/data/lavf/lavf.mkv
-320428 tests/data/lavf/lavf.mkv
+d5f719b715ad5eb6860c85f0d8202b8e *tests/data/lavf/lavf.mkv
+320426 tests/data/lavf/lavf.mkv
tests/data/lavf/lavf.mkv CRC=0xec6c3c68
diff --git a/tests/ref/lavf/mkv_attachment b/tests/ref/lavf/mkv_attachment
index 6a08a580d2..3a599c6ed5 100644
--- a/tests/ref/lavf/mkv_attachment
+++ b/tests/ref/lavf/mkv_attachment
@@ -1,3 +1,3 @@
-901b4ba820fe1d6c627ce2a4b31b65af *tests/data/lavf/lavf.mkv_attachment
-472578 tests/data/lavf/lavf.mkv_attachment
+7681b6ece94f20684838bcbba2458c58 *tests/data/lavf/lavf.mkv_attachment
+472576 tests/data/lavf/lavf.mkv_attachment
tests/data/lavf/lavf.mkv_attachment CRC=0xec6c3c68