ffmpeg/tests
Andreas Rheinhardt 358b58cb29 avformat/matroskaenc: Remove allocations for Attachments
If there are Attachments to write, the Matroska muxer currently
allocates two objects: An array that contains an entry for each
AttachedFile containing just the stream index of the corresponding
stream and the FileUID used for this AttachedFile; and a structure with
a pointer to said array and a counter for said array. These uids are
generated via code special to Attachments: It uses an AVLFG in the
normal and a sha of the attachment data in the bitexact case. (Said sha
requires an allocation, too.)

But now that an uid is generated for each stream in mkv_init(), there is
no need any more to use special code for generating the FileUIDs of
AttachedFiles: One can simply use the uid already generated for the
corresponding stream. And this makes the whole allocations of the
structures for AttachedFiles as well as the structures itself superfluous.
They have been removed.

In case AVFMT_FLAG_BITEXACT is set, the uids will be different from the
old ones which is the reason why the FATE-test lavf-mkv_attachment
needed to be updated. The old method had the drawback that two
AttachedFiles with the same data would have the same FileUID.
The new one doesn't.

Also notice that the dynamic buffer used to write the Attachments leaks
if an error happens when writing the buffer. By removing the
allocations potential sources of errors have been removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-13 08:34:59 +02:00
..
api
checkasm tests/checkasm: add overflow test for hevc_add_res 2020-03-27 10:57:40 +01:00
dnn dnn-layer-mathbinary-test: add unit test for subtraction 2020-04-07 11:04:40 +08:00
fate dnn-layer-mathbinary-test: add unit test for subtraction 2020-04-07 11:04:40 +08:00
filtergraphs
ref avformat/matroskaenc: Remove allocations for Attachments 2020-04-13 08:34:59 +02:00
.gitignore
Makefile fate: Add an option for disabling the 2k/4k tests 2019-12-17 10:22:29 +02:00
audiogen.c
audiomatch.c
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
md5.sh
refcmp-metadata.awk
reference.pnm
rotozoom.c
simple1.ffconcat
simple2.ffconcat
test.ffmeta
tiny_psnr.c
tiny_ssim.c
utils.c
videogen.c