1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
FFmpeg/tests/ref/lavf
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
..
aiff Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
al
apng Merge commit 'f8df5e2f31a5ba7b30a0e1caaaf5a03c753b3f9b' 2019-03-14 14:59:45 -03:00
apng.png Merge commit 'f8df5e2f31a5ba7b30a0e1caaaf5a03c753b3f9b' 2019-03-14 14:59:45 -03:00
asf Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
ast Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
au Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
avi Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
bmp Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
caf Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
dpx Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
dv Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
dv_ntsc Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
dv_pal Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
flm Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
flv Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
gbrap16be.fits Merge commit 'f8df5e2f31a5ba7b30a0e1caaaf5a03c753b3f9b' 2019-03-14 14:59:45 -03:00
gbrap.fits Merge commit 'f8df5e2f31a5ba7b30a0e1caaaf5a03c753b3f9b' 2019-03-14 14:59:45 -03:00
gbrp10le.dpx Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
gbrp12le.dpx Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
gbrp16be.fits Merge commit 'f8df5e2f31a5ba7b30a0e1caaaf5a03c753b3f9b' 2019-03-14 14:59:45 -03:00
gbrp.fits Merge commit 'f8df5e2f31a5ba7b30a0e1caaaf5a03c753b3f9b' 2019-03-14 14:59:45 -03:00
gif Merge commit 'f8df5e2f31a5ba7b30a0e1caaaf5a03c753b3f9b' 2019-03-14 14:59:45 -03:00
gray16be.fits avcodec/fitsdec: Use lrint() 2019-12-05 20:20:05 +01:00
gray16be.pam fate/lavf-image: fix passed arguments for some high bit depth tests 2019-03-14 17:15:28 -03:00
gray16be.png Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
gray.fits Merge commit 'f8df5e2f31a5ba7b30a0e1caaaf5a03c753b3f9b' 2019-03-14 14:59:45 -03:00
gray.pam Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
gray.xwd Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
gxf Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
gxf_ntsc Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
gxf_pal Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
ircam Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
ismv avformat/movenc: write the major brand also as the first compatible brand 2019-12-21 11:57:28 -03:00
jpg Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
mka avformat/matroskaenc: Don't waste bytes writing durations 2020-04-13 08:08:42 +02:00
mkv avformat/matroskaenc: Don't waste bytes writing durations 2020-04-13 08:08:42 +02:00
mkv_attachment avformat/matroskaenc: Remove allocations for Attachments 2020-04-13 08:34:59 +02:00
mmf Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
monob.pam Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
monow.xwd Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
mov avformat/movenc: ensure we don't write the major brand as a compatible brand more than once 2019-12-21 11:57:28 -03:00
mov_rtphint avformat/movenc: ensure we don't write the major brand as a compatible brand more than once 2019-12-21 11:57:28 -03:00
mp4 avformat/movenc: ensure we don't write the major brand as a compatible brand more than once 2019-12-21 11:57:28 -03:00
mpg Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
mxf avformat/mxfenc: use a zero based continuity counter 2020-03-02 22:01:47 +01:00
mxf_d10 Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
mxf_dv25 Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
mxf_dvcpro50 Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
mxf_opatom Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
mxf_opatom_audio Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
nut Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
ogg Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
pam Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
pbmpipe
pcx Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
peak_only.wav Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
peak.wav Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
pgm Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
pgmpipe
png Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
ppm Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
ppmpipe
rgb4_byte.xwd Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
rgb8.xwd Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
rgb48be.pam fate/lavf-image: fix passed arguments for some high bit depth tests 2019-03-14 17:15:28 -03:00
rgb48be.png Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
rgb48le_10.dpx fate/lavf-image: fix passed arguments for some high bit depth tests 2019-03-14 17:15:28 -03:00
rgb48le.dpx Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
rgb555be.xwd Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
rgb565be.xwd Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
rgba64le.dpx Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
rgba.pam Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
rgba.xwd Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
rm Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
rso
s16.voc Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
sgi Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
smjpeg Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
sox
sun Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
swf Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
tga Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
tiff Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
ts avformat/mpegtsenc: get rid of packet counting for sdt/pat/pmt 2019-08-23 22:49:01 +02:00
tta Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
ul
voc Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
w64 Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
wav Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
wtv Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c' 2019-03-14 14:36:24 -03:00
wv Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c' 2019-03-14 14:19:03 -03:00
xbm Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
xwd Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40' 2019-03-14 14:30:08 -03:00
y4m