Commit feaec3bc authored by Jun Zhao's avatar Jun Zhao

lavf/hlsenc: fix memory leak

fix memory leak
Reviewed-by: 's avatarSteven Liu <lq@chinaffmpeg.org>
Signed-off-by: 's avatarJun Zhao <barryjzhao@tencent.com>
parent ed3c317d
...@@ -585,6 +585,8 @@ static int hls_delete_old_segments(AVFormatContext *s, HLSContext *hls, ...@@ -585,6 +585,8 @@ static int hls_delete_old_segments(AVFormatContext *s, HLSContext *hls,
av_strlcpy(sub_path, vtt_dirname, sub_path_size); av_strlcpy(sub_path, vtt_dirname, sub_path_size);
av_strlcat(sub_path, segment->sub_filename, sub_path_size); av_strlcat(sub_path, segment->sub_filename, sub_path_size);
av_freep(&vtt_dirname);
if (hls->method || (proto && !av_strcasecmp(proto, "http"))) { if (hls->method || (proto && !av_strcasecmp(proto, "http"))) {
av_dict_set(&options, "method", "DELETE", 0); av_dict_set(&options, "method", "DELETE", 0);
if ((ret = vs->vtt_avf->io_open(vs->vtt_avf, &out, sub_path, AVIO_FLAG_WRITE, &options)) < 0) { if ((ret = vs->vtt_avf->io_open(vs->vtt_avf, &out, sub_path, AVIO_FLAG_WRITE, &options)) < 0) {
......
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