Andreas Rheinhardt
b10a8a30db
avformat/oggparsevorbis: Avoid tmp bufs when parsing VorbisComment
...
A single VorbisComment consists of a length field and a
non-NUL-terminated string of the form "key=value". Up until now,
when parsing such a VorbisComment, zero-terminated duplicates of
key and value would be created. This is wasteful if these duplicates
are freed shortly afterwards, as happens in particular in case of
attached pictures: In this case value is base64 encoded and only
needed to decode the actual data.
Therefore this commit changes this: The buffer is temporarily modified
so that both key and value are zero-terminated. Then the data is used
in-place and restored to its original state afterwards.
This requires that the buffer has at least one byte of padding. All
buffers currently have AV_INPUT_BUFFER_PADDING_SIZE bytes padding,
so this is ok.
Finally, this also fixes weird behaviour from ogm_chapter():
It sometimes freed given to it, leaving the caller with dangling
pointers.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-08-28 15:25:18 +02:00
..
2021-07-22 15:02:30 +02:00
2021-08-25 23:01:54 +02:00
2021-07-29 22:02:05 +02:00
2021-08-06 22:47:22 +02:00
2021-08-06 22:47:22 +02:00
2021-08-06 21:04:43 +02:00
2021-07-18 22:06:20 +02:00
2021-07-31 22:08:15 +02:00
2021-07-22 11:14:31 +02:00
2021-07-22 15:02:30 +02:00
2021-07-29 22:02:05 +02:00
2021-07-19 14:14:39 +10:00
2021-07-29 22:02:05 +02:00
2021-07-31 22:08:16 +02:00
2021-08-25 23:01:54 +02:00
2021-07-18 04:26:35 +02:00
2021-07-29 22:02:05 +02:00
2021-08-25 23:01:54 +02:00
2021-08-25 23:01:54 +02:00
2021-07-31 22:08:17 +02:00
2021-08-25 23:01:54 +02:00
2021-08-25 23:01:54 +02:00
2021-08-25 23:01:54 +02:00
2021-07-31 22:08:19 +02:00
2021-07-22 11:14:31 +02:00
2021-07-27 12:13:32 -03:00
2021-08-22 11:44:16 +02:00
2021-08-24 03:05:27 +02:00
2021-07-22 15:02:30 +02:00
2021-08-25 23:01:54 +02:00
2021-07-29 22:02:05 +02:00
2021-07-22 11:14:31 +02:00
2021-07-31 22:08:19 +02:00
2021-07-31 22:08:20 +02:00
2021-07-22 11:14:31 +02:00
2021-07-22 15:02:30 +02:00
2021-08-06 22:50:10 +02:00
2021-08-12 04:43:31 +02:00
2021-07-29 22:02:05 +02:00
2021-07-29 22:02:05 +02:00
2021-07-22 11:14:31 +02:00
2021-07-22 11:14:31 +02:00
2021-07-22 11:14:31 +02:00
2021-07-22 15:02:30 +02:00
2021-07-20 11:20:04 +05:30
2021-07-22 15:02:30 +02:00
2021-08-25 23:01:54 +02:00
2021-08-19 18:24:15 +08:00
2021-07-22 14:34:31 +02:00
2021-08-25 23:01:54 +02:00
2021-07-22 11:14:31 +02:00
2021-08-06 22:49:26 +02:00
2021-07-22 15:02:30 +02:00
2021-07-22 15:02:30 +02:00
2021-07-29 22:02:05 +02:00
2021-08-14 20:19:51 +03:00
2021-07-22 11:14:31 +02:00
2021-08-25 09:26:46 +03:00
2021-07-18 04:26:35 +02:00
2021-08-06 22:47:22 +02:00
2021-07-22 11:14:31 +02:00
2021-07-29 22:02:05 +02:00
2021-07-22 15:02:30 +02:00
2021-07-18 04:26:35 +02:00
2021-08-25 09:26:46 +03:00
2021-08-25 23:01:54 +02:00
2021-08-25 23:01:54 +02:00
2021-07-18 04:26:35 +02:00
2021-08-25 23:01:54 +02:00
2021-08-25 23:01:54 +02:00
2021-08-25 09:26:46 +03:00
2021-08-25 09:26:46 +03:00
2021-08-27 10:47:35 +02:00
2021-08-25 09:26:46 +03:00
2021-08-25 23:01:54 +02:00
2021-08-06 21:04:43 +02:00
2021-07-22 11:14:31 +02:00
2021-08-25 23:01:54 +02:00
2021-08-25 23:01:54 +02:00
2021-07-18 04:26:35 +02:00
2021-07-18 04:26:35 +02:00
2021-07-22 11:14:16 +02:00
2021-07-22 15:29:46 +02:00
2021-07-29 22:38:02 +02:00
2021-08-14 11:19:39 +02:00
2021-08-06 21:22:49 -03:00
2021-08-06 22:47:22 +02:00
2021-08-12 15:25:58 +02:00
2021-08-28 15:25:18 +02:00
2021-08-25 23:01:54 +02:00
2021-08-28 15:25:18 +02:00
2021-08-10 01:14:04 +02:00
2021-07-18 04:26:35 +02:00
2021-07-22 11:14:31 +02:00
2021-08-06 22:47:22 +02:00
2021-07-22 15:02:30 +02:00
2021-08-25 23:01:54 +02:00
2021-07-18 04:26:35 +02:00
2021-07-22 14:47:57 +02:00
2021-07-22 15:29:46 +02:00
2021-07-22 15:29:46 +02:00
2021-08-06 22:47:22 +02:00
2021-07-22 11:14:31 +02:00
2021-07-22 15:29:46 +02:00
2021-08-25 23:01:54 +02:00
2021-07-22 15:29:46 +02:00
2021-08-25 23:01:54 +02:00
2021-07-22 15:29:46 +02:00
2021-08-25 23:01:54 +02:00
2021-07-18 04:26:35 +02:00
2021-08-25 23:01:54 +02:00
2021-07-31 22:08:38 +02:00
2021-07-18 04:26:35 +02:00
2021-07-22 11:14:31 +02:00
2021-07-18 04:26:35 +02:00
2021-07-18 04:26:35 +02:00
2021-07-22 15:02:30 +02:00
2021-08-25 23:01:54 +02:00
2021-08-25 23:01:54 +02:00
2021-07-18 04:26:35 +02:00
2021-07-18 04:26:35 +02:00
2021-07-22 11:14:16 +02:00
2021-08-25 23:01:54 +02:00
2021-08-25 09:26:46 +03:00
2021-08-25 09:26:46 +03:00
2021-08-25 23:01:54 +02:00
2021-08-24 04:23:29 +02:00
2021-08-25 23:01:54 +02:00
2021-08-27 10:47:23 +02:00
2021-07-22 15:29:46 +02:00
2021-07-22 15:29:46 +02:00
2021-07-18 04:26:35 +02:00
2021-08-06 22:47:22 +02:00
2021-07-22 15:02:30 +02:00
2021-07-22 11:14:31 +02:00
2021-08-06 21:04:43 +02:00
2021-07-23 15:05:39 +02:00
2021-08-06 21:59:14 +02:00