[FFmpeg-devel] [PATCH] avformat/hlsenc: free memory when hlsenc_io_open failed.

jiangjie jiangjie618 at gmail.com
Sat Oct 26 16:07:24 EEST 2024


---
 libavformat/hlsenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 6148685f40..0d560ad1ce 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -932,6 +932,7 @@ static int hls_mux_init(AVFormatContext *s, VariantStream *vs)
         av_dict_free(&options);
     }
     if (ret < 0) {
+        ffio_free_dyn_buf(&oc->pb);
         av_log(s, AV_LOG_ERROR, "Failed to open segment '%s'\n", vs->fmp4_init_filename);
         return ret;
     }
-- 
2.43.0



More information about the ffmpeg-devel mailing list