1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-12 19:18:44 +02:00
FFmpeg/tests/ref/fate/matroska-dvbsub-remux
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

53 lines
2.7 KiB
Plaintext

d6385d4623cd59061c13e26b004eaa8e *tests/data/fate/matroska-dvbsub-remux.matroska
39016 tests/data/fate/matroska-dvbsub-remux.matroska
#extradata 0: 5, 0x00bb0064
#extradata 1: 5, 0x00bb0064
#tb 0: 1/1000
#media_type 0: subtitle
#codec_id 0: dvb_subtitle
#tb 1: 1/1000
#media_type 1: subtitle
#codec_id 1: dvb_subtitle
0, 0, 0, 280, 14, 0x05f400e1
1, 0, 0, 0, 14, 0x05f400e1
0, 280, 280, 5000, 14, 0x066400f1
1, 280, 280, 0, 14, 0x066400f1
0, 5280, 5280, 5020, 14, 0x06d40101
1, 5280, 5280, 0, 14, 0x06d40101
0, 10300, 10300, 3600, 14, 0x07440111
1, 10300, 10300, 0, 14, 0x07440111
0, 13900, 13900, 220, 14, 0x07b40121
1, 13900, 13900, 0, 14, 0x07b40121
0, 14120, 14120, 1440, 14, 0x08240131
1, 14120, 14120, 0, 14, 0x08240131
0, 15560, 15560, 40, 14, 0x08940141
1, 15560, 15560, 0, 14, 0x08940141
0, 15600, 15600, 160, 944, 0x454c0939
1, 15600, 15600, 0, 944, 0x454c0939
0, 15760, 15760, 240, 630, 0x49dbb35f
1, 15760, 15760, 0, 630, 0x49dbb35f
0, 16000, 16000, 340, 344, 0xb1eb63ed
1, 16000, 16000, 0, 344, 0xb1eb63ed
0, 16340, 16340, 600, 966, 0xb8a61edf
1, 16340, 16340, 0, 966, 0xb8a61edf
0, 16940, 16940, 460, 470, 0x80597fba
1, 16940, 16940, 0, 470, 0x80597fba
0, 17400, 17400, 360, 1212, 0x554768d6
1, 17400, 17400, 0, 1212, 0x554768d6
0, 17760, 17760, 220, 4804, 0xab67ddbe
1, 17760, 17760, 0, 4804, 0xab67ddbe
0, 17980, 17980, 960, 1016, 0x15e42d56
1, 17980, 17980, 0, 1016, 0x15e42d56
0, 18940, 18940, 220, 456, 0x57917e6f
1, 18940, 18940, 0, 456, 0x57917e6f
0, 19160, 19160, 260, 830, 0xcff3efde
1, 19160, 19160, 0, 830, 0xcff3efde
0, 19420, 19420, 100, 860, 0xd89903b6
1, 19420, 19420, 0, 860, 0xd89903b6
0, 19520, 19520, 220, 4426, 0x01eb43f1
1, 19520, 19520, 0, 4426, 0x01eb43f1
0, 19740, 19740, 220, 1132, 0xedda51a8
1, 19740, 19740, 0, 1132, 0xedda51a8
0, 19960, 19960, 0, 466, 0x9c957e09
1, 19960, 19960, 0, 466, 0x9c957e09