Andreas Rheinhardt
d53acf452f
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>
2023-08-10 23:56:35 +02:00
..
2019-03-14 14:19:03 -03:00
2019-02-16 18:15:22 +01:00
2019-03-14 14:59:45 -03:00
2019-03-14 14:59:45 -03:00
2023-04-19 21:12:03 +02:00
2019-03-14 14:19:03 -03:00
2019-03-14 14:19:03 -03:00
2019-03-14 14:36:24 -03:00
2022-08-02 02:27:05 +02:00
2019-03-14 14:19:03 -03:00
2022-09-18 17:48:52 +02:00
2022-08-02 02:27:05 +02:00
2019-03-14 14:36:24 -03:00
2019-03-14 14:36:24 -03:00
2019-03-14 14:36:24 -03:00
2019-03-14 14:36:24 -03:00
2019-03-14 14:36:24 -03:00
2021-02-10 00:03:38 +01:00
2021-02-10 00:03:38 +01:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2021-02-10 00:03:38 +01:00
2021-02-10 00:03:38 +01:00
2022-12-27 10:41:25 -03:00
2022-12-27 10:41:25 -03:00
2023-07-20 20:30:13 +02:00
2021-02-10 00:03:38 +01:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2021-02-10 00:03:38 +01:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2022-12-27 10:41:25 -03:00
2022-12-27 10:41:25 -03:00
2019-03-14 14:36:24 -03:00
2019-03-14 14:36:24 -03:00
2019-03-14 14:36:24 -03:00
2019-03-14 14:19:03 -03:00
2020-09-22 18:25:44 +03:00
2022-08-02 02:27:05 +02:00
2023-08-10 23:56:35 +02:00
2023-08-10 23:56:35 +02:00
2023-08-10 23:56:35 +02:00
2019-03-14 14:19:03 -03:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2019-12-21 11:57:28 -03:00
2019-12-21 11:57:28 -03:00
2022-06-24 15:37:23 +08:00
2019-03-14 14:36:24 -03:00
2022-03-16 21:37:53 +01:00
2022-03-16 21:37:53 +01:00
2022-09-05 08:02:28 +02:00
2022-03-16 21:37:53 +01:00
2023-03-26 22:04:44 +02:00
2023-03-25 19:28:36 +01:00
2023-03-26 22:04:44 +02:00
2022-03-16 21:37:53 +01:00
2022-08-02 02:30:26 +02:00
2022-08-02 02:30:26 +02:00
2022-08-02 02:30:26 +02:00
2019-03-14 14:36:24 -03:00
2023-01-03 21:35:03 -03:00
2022-08-02 02:27:05 +02:00
2019-03-14 14:15:46 -03:00
2022-08-02 02:27:05 +02:00
2022-05-06 05:39:10 +02:00
2019-03-14 14:19:03 -03:00
2022-08-02 02:27:05 +02:00
2019-03-14 14:15:46 -03:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2019-02-16 18:15:11 +01:00
2022-08-02 02:27:05 +02:00
2022-12-03 19:38:11 +01:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:30:26 +02:00
2022-08-02 02:30:26 +02:00
2022-08-02 02:30:26 +02:00
2022-11-06 14:39:27 +01:00
2019-02-16 18:15:22 +01:00
2019-03-14 14:19:03 -03:00
2022-10-05 14:38:51 +02:00
2023-05-02 10:59:24 +02:00
2019-02-16 18:15:22 +01:00
2022-08-02 02:27:05 +02:00
2019-03-14 14:36:24 -03:00
2022-08-02 02:27:05 +02:00
2022-08-02 02:27:05 +02:00
2019-08-23 22:49:01 +02:00
2019-03-14 14:19:03 -03:00
2019-02-16 18:15:22 +01:00
2019-03-14 14:19:03 -03:00
2019-03-14 14:19:03 -03:00
2019-03-14 14:19:03 -03:00
2022-08-07 19:18:18 +10:00
2019-03-14 14:36:24 -03:00
2019-03-14 14:19:03 -03:00
2022-08-02 02:27:05 +02:00
2022-12-03 19:38:11 +01:00
2022-08-02 02:27:05 +02:00
2022-12-03 19:38:11 +01:00
2019-02-16 18:15:55 +01:00
2022-08-02 02:30:26 +02:00
2022-08-02 02:30:26 +02:00
2022-08-02 02:30:26 +02:00
2022-08-02 02:30:26 +02:00
2022-08-02 02:30:26 +02:00
2022-08-02 02:30:26 +02:00