1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
FFmpeg/tests/ref/fate/webm-av1-extradata-update
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

33 lines
1.8 KiB
Plaintext

dc7593b977b092e522018de7e0d12681 *tests/data/fate/webm-av1-extradata-update.webm
23047 tests/data/fate/webm-av1-extradata-update.webm
#extradata 0: 35, 0x527207cd
#tb 0: 1/1000
#media_type 0: video
#codec_id 0: av1
#dimensions 0: 240x100
#sar 0: 3/1
0, 0, 0, 41, 8168, 0x1851ab62
0, 42, 42, 41, 7040, 0x967788f9, F=0x0
0, 83, 83, 41, 4, 0x01f400e2, F=0x0
0, 125, 125, 41, 48, 0x49ad107e, F=0x0
0, 167, 167, 41, 4, 0x021c00fa, F=0x0
0, 208, 208, 41, 279, 0x69728439, F=0x0
0, 250, 250, 41, 4, 0x01c400d2, F=0x0
0, 292, 292, 41, 63, 0x9bbf1836, F=0x0
0, 333, 333, 41, 4, 0x026c012a, F=0x0
0, 375, 375, 41, 1065, 0xce2003ac, F=0x0
0, 417, 417, 41, 4, 0x019400c2, F=0x0
0, 458, 458, 41, 52, 0x7a0112f1, F=0x0
0, 500, 500, 41, 4, 0x021c010a, F=0x0
0, 542, 542, 41, 689, 0x1e8b49e7, F=0x0
0, 583, 583, 41, 4, 0x01e400f2, F=0x0
0, 625, 625, 41, 209, 0x124c6790, F=0x0
0, 667, 667, 41, 42, 0xea690e31, F=0x0
0, 708, 708, 41, 3521, 0xd76ee284, F=0x0
0, 750, 750, 41, 63, 0x4572188f, F=0x0
0, 792, 792, 41, 386, 0xb078c259, F=0x0
0, 833, 833, 41, 178, 0x1ebb5121, F=0x0
0, 875, 875, 41, 60, 0x729317f7, F=0x0
0, 917, 917, 41, 40, 0xad970a66, F=0x0
0, 958, 958, 41, 61, 0xcc0d1a20, F=0x0