1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
FFmpeg/tests
Andreas Rheinhardt dc2f6b54ac avformat/matroskaenc: Avoid allocations for SeekHead
Up until e7ddafd5, the Matroska muxer wrote two SeekHeads: One at the
beginning referencing the main level 1 elements (i.e. not the Clusters)
and one at the end, referencing the Clusters. This second SeekHead was
useless and has therefore been removed. Yet the SeekHead-related
functions and structures are still geared towards this usecase: They
are built around an allocated array of variable size that gets
reallocated every time an element is added to it although the maximum
number of Seek entries is a small compile-time constant, so that one should
rather include the array in the SeekHead structure itself; and said
structure should be contained in the MatroskaMuxContext instead of being
allocated separately.

The earlier code reserved space for a SeekHead with 10 entries, although
we currently write at most 6. Reducing said number implied that every
Matroska/Webm file will be 84 bytes smaller and required to adapt
several FATE tests; furthermore, the reserved amount overestimated the
amount needed for for the SeekHead's length field and how many bytes
need to be reserved to write a EBML Void element, bringing the total
reduction to 89 bytes.

This also fixes a potential segfault: If !mkv->is_live and if the
AVIOContext is initially unseekable when writing the header, the
SeekHead is already written when writing the header and this used to
free the SeekHead-related structures that have been allocated. But if
the AVIOContext happens to be seekable when writing the trailer, it will
be attempted to write the SeekHead again which will lead to segfaults
because the corresponding structures have already been freed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-03-26 03:19:56 +01:00
..
api tests/api/api-h264-test: Add AV_NOPTS_VALUE check for AVFrame.pkt_dts/pts 2019-02-12 22:28:15 +08:00
checkasm checkasm: sbrdsp: Fix a spurious test failure by calculating a better epsilon for sum_square 2020-02-08 23:00:21 +02:00
dnn dnn: add tf.nn.conv2d support for native model 2019-10-30 10:31:55 -03:00
fate avformat/matroskaenc: Avoid allocations for SeekHead 2020-03-26 03:19:56 +01:00
filtergraphs lavfi/concat: allow to support inputs with different frame rates 2019-09-08 16:48:28 +02:00
ref avformat/matroskaenc: Avoid allocations for SeekHead 2020-03-26 03:19:56 +01:00
.gitignore
audiogen.c tests/audiogen: raise channel count limit to 12 2018-07-30 10:46:10 +02:00
audiomatch.c tests/audiomatch: Add missing return code at the end of main() 2017-12-19 21:32:04 +01:00
base64.c
copycooker.sh
extended.ffconcat
fate-run.sh fate: Don't use depreceated keepside option 2020-01-10 12:28:18 -03:00
fate-valgrind.supp
fate.sh fate: Error out more gracefully on configure failure 2018-02-26 13:30:05 +01:00
Makefile fate: Add an option for disabling the 2k/4k tests 2019-12-17 10:22:29 +02:00
md5.sh
refcmp-metadata.awk fate: add tests for psnr and ssim filter 2017-09-27 15:58:49 +02:00
reference.pnm
rotozoom.c
simple1.ffconcat
simple2.ffconcat
test.ffmeta
tiny_psnr.c
tiny_ssim.c
utils.c
videogen.c