[FFmpeg-cvslog] avformat/avformat: also clear FFFormatContext packet queue when closing a muxer
James Almer
git at videolan.org
Fri Jan 17 15:11:29 EET 2025
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Jan 17 00:05:31 2025 -0300| [c08d300481b8ebb846cd43a473988fdbc6793d1b] | committer: James Almer
avformat/avformat: also clear FFFormatContext packet queue when closing a muxer
packet_buffer is used in mux.c, and if a muxing process fails at a point where
packets remained in said queue, they will leak.
Fixes ticket #11419
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c08d300481b8ebb846cd43a473988fdbc6793d1b
---
libavformat/avformat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/avformat.c b/libavformat/avformat.c
index eb9afad837..3801ef5d58 100644
--- a/libavformat/avformat.c
+++ b/libavformat/avformat.c
@@ -190,6 +190,7 @@ void avformat_free_context(AVFormatContext *s)
av_dict_free(&si->id3v2_meta);
av_packet_free(&si->pkt);
av_packet_free(&si->parse_pkt);
+ avpriv_packet_list_free(&si->packet_buffer);
av_freep(&s->streams);
av_freep(&s->stream_groups);
if (s->iformat)
More information about the ffmpeg-cvslog
mailing list