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>
pull/322/head
Andreas Rheinhardt 6 years ago committed by Steven Liu
parent 88a26abcc6
commit 1a066d87e3
  1. 1
      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;
}

Loading…
Cancel
Save