Commit 1a066d87 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Steven Liu

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: 's avatarSteven Liu <lq@onvideo.cn>
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
parent 88a26abc
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment