summaryrefslogtreecommitdiff
path: root/libavformat/hlsenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-09-11 14:36:36 +0200
committerSteven Liu <lq@chinaffmpeg.org>2019-09-14 09:55:49 +0800
commit1a066d87e3ea2fb8139af9181b3abf0f0a16a208 (patch)
treeea583b4dededb3e5e9bb4eb850a9ce7ce0176edf /libavformat/hlsenc.c
parent88a26abcc6579c4e63c42a8ca26f7f93ae5d4e0d (diff)
avformat/hlsenc: Fix memleak when using single_file
This commit fixes a memleak in the hls muxer when one uses a single file as output. It has been forgotten to free the temporary buffers used to write the packets so that the size of the leaks basically amounts to the size of the output file. This commit adds the necessary free. Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r--libavformat/hlsenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 8491d84b70..5d0a8fc76c 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2366,6 +2366,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
if (hls->flags & HLS_SINGLE_FILE) {
ret = flush_dynbuf(vs, &range_length);
+ av_freep(&vs->temp_buffer);
if (ret < 0) {
return ret;
}