You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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>
This commit is contained in:
committed by
Michael Niedermayer
parent
020159e0e7
commit
148fb44b36
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user