summaryrefslogtreecommitdiff
path: root/libavformat/mux.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-08-13 04:47:15 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-01-26 17:24:41 +0100
commit148fb44b369403931e5ad299aefb0e6a4206a0f7 (patch)
tree940c3399275121134a3d3096a95944039bbbf160 /libavformat/mux.c
parent020159e0e73ddeaeb393f1c40d58fd11447d95a1 (diff)
downloadffmpeg-148fb44b369403931e5ad299aefb0e6a4206a0f7.tar.gz
avformat/mux: Don't unnecessarily zero-initialize AVPacketList
If no error occurs and this AVPacketList is used at all, its packet substructure will be overwritten and its next pointer explicitly set, so every field will still be initialized even when using av_malloc. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r--libavformat/mux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 16bf9bd499..a06d983059 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -931,7 +931,7 @@ int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
AVStream *st = s->streams[pkt->stream_index];
int chunked = s->max_chunk_size || s->max_chunk_duration;
- this_pktl = av_mallocz(sizeof(AVPacketList));
+ this_pktl = av_malloc(sizeof(AVPacketList));
if (!this_pktl)
return AVERROR(ENOMEM);
if ((pkt->flags & AV_PKT_FLAG_UNCODED_FRAME)) {