Patch for https://trac.ffmpeg.org/ticket/7610
hls.c:933 free_segment_dynarray(prev_segments, prev_n_segments); cleans all elements of prev_segments, but does not frees prev_segments array itself. As a result, process slowly leaks memory every time it updates playlist. Added call to av_freep(&prev_segments)
From 90f3f7abd3561ef12404686dfac99940e8c5167e Mon Sep 17 00:00:00 2001 From: vkot <valery....@4cinsights.com> Date: Fri, 14 Dec 2018 13:38:05 +0100 Subject: [PATCH] Fix memory leak in hls.c --- libavformat/hls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/hls.c b/libavformat/hls.c index 8ad08baaed..63e1abe789 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -931,6 +931,7 @@ static int parse_playlist(HLSContext *c, const char *url, prev_start_seq_no, pls->start_seq_no); } free_segment_dynarray(prev_segments, prev_n_segments); + av_freep(&prev_segments); } if (pls) pls->last_load_time = av_gettime_relative(); -- 2.15.1.windows.2
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel