aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2025-01-17 00:05:31 -0300
committerJames Almer <jamrial@gmail.com>2025-01-17 10:10:51 -0300
commitc08d300481b8ebb846cd43a473988fdbc6793d1b (patch)
tree7cf83698fd7c84e87a7fff9a1808cf0db3fea1e6
parent4f3c9f2f03378a08692a26532bc3146414717f8c (diff)
downloadffmpeg-c08d300481b8ebb846cd43a473988fdbc6793d1b.tar.gz
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@gmail.com>
-rw-r--r--libavformat/avformat.c1
1 files changed, 1 insertions, 0 deletions
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)