mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avpacket: Initialize the allocated padding area in side data
This makes sure that consumers of the side data actually can rely on the padding as intended, without having the callers of av_packet_new_side_data to explicitly zero initialize it. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
5085f25ace
commit
8965e2af92
@ -271,6 +271,7 @@ uint8_t *av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
|
||||
data = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!data)
|
||||
return NULL;
|
||||
memset(data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
|
||||
ret = av_packet_add_side_data(pkt, type, data, size);
|
||||
if (ret < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user