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

67 lines
1.4 KiB
Plaintext

fddfea5f05a7a9a0d187df9a72900055 *tests/data/fate/matroska-spherical-mono-remux.matroska
161582 tests/data/fate/matroska-spherical-mono-remux.matroska
#extradata 0: 43, 0x2b0e0d7b
#extradata 1: 43, 0x2b0e0d7b
#tb 0: 1/1000
#media_type 0: video
#codec_id 0: h264
#dimensions 0: 1920x1080
#sar 0: 0/1
#tb 1: 1/1000
#media_type 1: video
#codec_id 1: h264
#dimensions 1: 1920x1080
#sar 1: 0/1
0, -80, 0, 40, 69118, 0x73cb52f0, S=2, 12, 36
1, -80, 0, 40, 69118, 0x73cb52f0, S=2, 12, 36
0, -40, 160, 40, 1103, 0x082a059f, F=0x0
1, -40, 160, 40, 1103, 0x082a059f, F=0x0
[STREAM]
color_range=unknown
color_space=unknown
color_transfer=unknown
color_primaries=unknown
DISPOSITION:default=0
DISPOSITION:forced=1
[SIDE_DATA]
side_data_type=Stereo 3D
type=2D
inverted=0
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Spherical Mapping
projection=tiled equirectangular
bound_left=148
bound_top=73
bound_right=147
bound_bottom=72
yaw=45
pitch=30
roll=15
[/SIDE_DATA]
[/STREAM]
[STREAM]
color_range=pc
color_space=bt2020c
color_transfer=smpte170m
color_primaries=bt709
DISPOSITION:default=0
DISPOSITION:forced=0
[SIDE_DATA]
side_data_type=Stereo 3D
type=2D
inverted=0
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Spherical Mapping
projection=tiled equirectangular
bound_left=148
bound_top=73
bound_right=147
bound_bottom=72
yaw=45
pitch=30
roll=15
[/SIDE_DATA]
[/STREAM]