Browse Source

lavf/hlsenc: fix memory leak

fix memory leak

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
tags/n4.3
Jun Zhao 6 years ago
parent
commit
feaec3bc31
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/hlsenc.c

+ 2
- 0
libavformat/hlsenc.c 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) {


Loading…
Cancel
Save