mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
d53acf452f
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>
45 lines
1.9 KiB
Plaintext
45 lines
1.9 KiB
Plaintext
f0b0a6a8a0fc975aef9048023faf7c92 *tests/data/fate/matroska-flac-extradata-update.matroska
|
|
1804 tests/data/fate/matroska-flac-extradata-update.matroska
|
|
#extradata 0: 34, 0x93650c81
|
|
#extradata 1: 34, 0x93650c81
|
|
#extradata 2: 34, 0x93650c81
|
|
#tb 0: 1/1000
|
|
#media_type 0: audio
|
|
#codec_id 0: flac
|
|
#sample_rate 0: 48000
|
|
#channel_layout_name 0: 5.1
|
|
#tb 1: 1/1000
|
|
#media_type 1: audio
|
|
#codec_id 1: flac
|
|
#sample_rate 1: 48000
|
|
#channel_layout_name 1: 5.1(side)
|
|
#tb 2: 1/1000
|
|
#media_type 2: audio
|
|
#codec_id 2: flac
|
|
#sample_rate 2: 48000
|
|
#channel_layout_name 2: 5.1
|
|
0, 0, 0, 96, 26, 0x4e160341
|
|
1, 0, 0, 96, 26, 0x4e160341
|
|
2, 0, 0, 96, 26, 0x4e160341
|
|
0, 96, 96, 96, 26, 0x4e17035c
|
|
1, 96, 96, 96, 26, 0x4e17035c
|
|
2, 96, 96, 96, 26, 0x4e17035c
|
|
0, 192, 192, 96, 26, 0x4de40383
|
|
1, 192, 192, 96, 26, 0x4de40383
|
|
2, 192, 192, 96, 26, 0x4de40383
|
|
0, 288, 288, 96, 26, 0x4e3903a2
|
|
1, 288, 288, 96, 26, 0x4e3903a2
|
|
2, 288, 288, 96, 26, 0x4e3903a2
|
|
0, 384, 384, 96, 26, 0x4f9a03d5
|
|
1, 384, 384, 96, 26, 0x4f9a03d5
|
|
2, 384, 384, 96, 26, 0x4f9a03d5
|
|
0, 480, 480, 96, 26, 0x501303e0
|
|
1, 480, 480, 96, 26, 0x501303e0
|
|
2, 480, 480, 96, 26, 0x501303e0
|
|
0, 576, 576, 96, 26, 0x5160042f
|
|
1, 576, 576, 96, 26, 0x5160042f
|
|
2, 576, 576, 96, 26, 0x5160042f
|
|
0, 672, 672, 96, 26, 0x50dd042e
|
|
1, 672, 672, 96, 26, 0x50dd042e
|
|
2, 672, 672, 96, 26, 0x50dd042e
|