mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avformat/mpegenc: Fix leak in case trailer is never written
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
@@ -1262,6 +1262,11 @@ static void mpeg_mux_deinit(AVFormatContext *ctx)
|
||||
StreamInfo *stream = ctx->streams[i]->priv_data;
|
||||
if (!stream)
|
||||
continue;
|
||||
for (PacketDesc *pkt = stream->predecode_packet; pkt; ) {
|
||||
PacketDesc *tmp = pkt->next;
|
||||
av_free(pkt);
|
||||
pkt = tmp;
|
||||
}
|
||||
av_fifo_freep(&stream->fifo);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user