lavf/hlsenc: fix memory leak

fix memory leak

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
This commit is contained in:
Jun Zhao 2019-10-12 00:47:25 +08:00
parent ed3c317dea
commit feaec3bc31
1 changed files with 2 additions and 0 deletions

View File

@ -585,6 +585,8 @@ static int hls_delete_old_segments(AVFormatContext *s, HLSContext *hls,
av_strlcpy(sub_path, vtt_dirname, 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"))) {
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) {