mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +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>
104 lines
3.8 KiB
Plaintext
104 lines
3.8 KiB
Plaintext
b9881205f8945fefc16a6f23474071a6 *tests/data/fate/matroska-opus-remux.matroska
|
|
9358 tests/data/fate/matroska-opus-remux.matroska
|
|
#extradata 0: 19, 0x3a04048f
|
|
#tb 0: 1/1000
|
|
#media_type 0: audio
|
|
#codec_id 0: opus
|
|
#sample_rate 0: 48000
|
|
#channel_layout_name 0: mono
|
|
0, -7, -7, 20, 320, 0x58b9a88d
|
|
0, 14, 14, 20, 159, 0x6c9c4b4c
|
|
0, 34, 34, 20, 148, 0x0caf4b5d
|
|
0, 54, 54, 20, 139, 0xc5624226
|
|
0, 74, 74, 20, 146, 0x633c4937
|
|
0, 94, 94, 20, 153, 0x3d0b4f93
|
|
0, 114, 114, 20, 158, 0xe5c55641
|
|
0, 134, 134, 20, 156, 0xf2fd50ef
|
|
0, 154, 154, 20, 158, 0x93b15410
|
|
0, 174, 174, 20, 157, 0xb6f74f5f
|
|
0, 194, 194, 20, 159, 0x9aff4957
|
|
0, 214, 214, 20, 153, 0xfc5f4aba
|
|
0, 234, 234, 20, 158, 0x01e44f70
|
|
0, 254, 254, 20, 153, 0x227149cf
|
|
0, 274, 274, 20, 155, 0x312f4cf6
|
|
0, 294, 294, 20, 155, 0xafc54bae
|
|
0, 314, 314, 20, 151, 0x7b4252b3
|
|
0, 334, 334, 20, 155, 0x29074a75
|
|
0, 354, 354, 20, 149, 0x82c44bcd
|
|
0, 374, 374, 20, 150, 0x55c24eb5
|
|
0, 394, 394, 20, 156, 0xf71d4f33
|
|
0, 414, 414, 20, 153, 0x9b6c4ae5
|
|
0, 434, 434, 20, 156, 0x75954e51
|
|
0, 454, 454, 20, 155, 0x28ff4ff3
|
|
0, 474, 474, 20, 153, 0xc4424969
|
|
0, 494, 494, 20, 154, 0xfbf94cc8
|
|
0, 514, 514, 20, 155, 0x52c549af
|
|
0, 534, 534, 20, 150, 0x6f1e4b7a
|
|
0, 554, 554, 20, 158, 0xabb45566
|
|
0, 574, 574, 20, 157, 0xe61d4a99
|
|
0, 594, 594, 20, 159, 0xf45d4fac
|
|
0, 614, 614, 20, 159, 0xcd0553a5
|
|
0, 634, 634, 20, 156, 0xdb244e63
|
|
0, 654, 654, 20, 154, 0x78654c52
|
|
0, 674, 674, 20, 154, 0x9f804cc8
|
|
0, 694, 694, 20, 150, 0x1fdf4c80
|
|
0, 714, 714, 20, 155, 0x1adc4f89
|
|
0, 734, 734, 20, 155, 0x4b53511c
|
|
0, 754, 754, 20, 151, 0x8ff2546d
|
|
0, 774, 774, 20, 158, 0xb7e34f1b
|
|
0, 794, 794, 20, 154, 0x4d98474b
|
|
0, 814, 814, 20, 154, 0x14924ea8
|
|
0, 834, 834, 20, 153, 0x8d4752bf
|
|
0, 854, 854, 20, 149, 0x74785066
|
|
0, 874, 874, 20, 151, 0x36c94a4c
|
|
0, 894, 894, 20, 155, 0x82904f3b
|
|
0, 914, 914, 20, 154, 0xd76b4a45
|
|
0, 934, 934, 20, 159, 0x9fec548d
|
|
0, 954, 954, 20, 154, 0x9a084dcd
|
|
0, 974, 974, 20, 155, 0x90a54ac8
|
|
0, 994, 994, 20, 324, 0x8e34a2f5
|
|
0, 1014, 1014, 20, 268, 0x10f37203, S=1, 10
|
|
[PACKET]
|
|
codec_type=audio
|
|
stream_index=0
|
|
pts=-7
|
|
pts_time=-0.007000
|
|
dts=-7
|
|
dts_time=-0.007000
|
|
duration=20
|
|
duration_time=0.020000
|
|
size=320
|
|
pos=499
|
|
flags=K__
|
|
[/PACKET]
|
|
[PACKET]
|
|
codec_type=audio
|
|
stream_index=0
|
|
pts=14
|
|
pts_time=0.014000
|
|
dts=14
|
|
dts_time=0.014000
|
|
duration=20
|
|
duration_time=0.020000
|
|
size=159
|
|
pos=826
|
|
flags=K__
|
|
[/PACKET]
|
|
[PACKET]
|
|
codec_type=audio
|
|
stream_index=0
|
|
pts=34
|
|
pts_time=0.034000
|
|
dts=34
|
|
dts_time=0.034000
|
|
duration=20
|
|
duration_time=0.020000
|
|
size=148
|
|
pos=992
|
|
flags=K__
|
|
[/PACKET]
|
|
[STREAM]
|
|
codec_name=opus
|
|
initial_padding=312
|
|
[/STREAM]
|