• Andreas Rheinhardt's avatar
    avformat/matroskaenc: Don't waste bytes writing durations · bd7dea3f
    Andreas Rheinhardt authored
    Tags in the Matroska file format can be summarized as follows: There is
    a level 1-element called Tags containing one or many Tag elements each
    of which in turn contain a Targets element and one or many SimpleTags.
    Each SimpleTag roughly corresponds to a single key-value pair similar to
    an AVDictionaryEntry. The Targets meanwhile contains information to what
    the metadata contained in the SimpleTags contained in the containing Tag
    applies (i.e. to the file as a whole or to an individual track).
    
    The Matroska muxer writes such metadata. It puts the metadata of every
    stream into a Tag whose Targets makes it point to the corresponding
    track. And if the output is seekable, then it also adds another Tag for
    each track whose Targets corresponds to the track and where it reserves
    space in a SimpleTag to write the duration at the end of the muxing
    process into.
    
    Yet there is no reason to write two Tag elements for a track and a few
    bytes (typically 24 bytes per track) can be saved by adding the duration
    SimpleTag to the other Tag of the same track (if it exists).
    
    FATE has been updated because the output files changed. (Tests that
    write to unseekable output (pipes) needn't be updated (no duration tag
    has ever been written for them) and the same applies to tests without
    further metadata.)
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    bd7dea3f
Name
Last commit
Last update
..
aiff Loading commit data...
al Loading commit data...
apng Loading commit data...
apng.png Loading commit data...
asf Loading commit data...
ast Loading commit data...
au Loading commit data...
avi Loading commit data...
bmp Loading commit data...
caf Loading commit data...
dpx Loading commit data...
dv Loading commit data...
dv_ntsc Loading commit data...
dv_pal Loading commit data...
flm Loading commit data...
flv Loading commit data...
gbrap.fits Loading commit data...
gbrap16be.fits Loading commit data...
gbrp.fits Loading commit data...
gbrp10le.dpx Loading commit data...
gbrp12le.dpx Loading commit data...
gbrp16be.fits Loading commit data...
gif Loading commit data...
gray.fits Loading commit data...
gray.pam Loading commit data...
gray.xwd Loading commit data...
gray16be.fits Loading commit data...
gray16be.pam Loading commit data...
gray16be.png Loading commit data...
gxf Loading commit data...
gxf_ntsc Loading commit data...
gxf_pal Loading commit data...
ircam Loading commit data...
ismv Loading commit data...
jpg Loading commit data...
mka Loading commit data...
mkv Loading commit data...
mkv_attachment Loading commit data...
mmf Loading commit data...
monob.pam Loading commit data...
monow.xwd Loading commit data...
mov Loading commit data...
mov_rtphint Loading commit data...
mp4 Loading commit data...
mpg Loading commit data...
mxf Loading commit data...
mxf_d10 Loading commit data...
mxf_dv25 Loading commit data...
mxf_dvcpro50 Loading commit data...
mxf_opatom Loading commit data...
mxf_opatom_audio Loading commit data...
nut Loading commit data...
ogg Loading commit data...
pam Loading commit data...
pbmpipe Loading commit data...
pcx Loading commit data...
peak.wav Loading commit data...
peak_only.wav Loading commit data...
pgm Loading commit data...
pgmpipe Loading commit data...
png Loading commit data...
ppm Loading commit data...
ppmpipe Loading commit data...
rgb48be.pam Loading commit data...
rgb48be.png Loading commit data...
rgb48le.dpx Loading commit data...
rgb48le_10.dpx Loading commit data...
rgb4_byte.xwd Loading commit data...
rgb555be.xwd Loading commit data...
rgb565be.xwd Loading commit data...
rgb8.xwd Loading commit data...
rgba.pam Loading commit data...
rgba.xwd Loading commit data...
rgba64le.dpx Loading commit data...
rm Loading commit data...
rso Loading commit data...
s16.voc Loading commit data...
sgi Loading commit data...
smjpeg Loading commit data...
sox Loading commit data...
sun Loading commit data...
swf Loading commit data...
tga Loading commit data...
tiff Loading commit data...
ts Loading commit data...
tta Loading commit data...
ul Loading commit data...
voc Loading commit data...
w64 Loading commit data...
wav Loading commit data...
wtv Loading commit data...
wv Loading commit data...
xbm Loading commit data...
xwd Loading commit data...
y4m Loading commit data...