From: Jun Zhao <[email protected]> In case of failure, all the successfully set entries are stored in *pm. We need to manually free the created dictionary to avoid memory leak.
Signed-off-by: Jun Zhao <[email protected]> --- libavformat/hlsenc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 6551e1c..df19545 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -856,6 +856,7 @@ static int hls_mux_init(AVFormatContext *s, VariantStream *vs) if (hls->format_options_str) { ret = av_dict_parse_string(&hls->format_options, hls->format_options_str, "=", ":", 0); if (ret < 0) { + av_dict_free(&hls->format_options); av_log(s, AV_LOG_ERROR, "Could not parse format options list '%s'\n", hls->format_options_str); return ret; @@ -2781,6 +2782,7 @@ static int hls_init(AVFormatContext *s) if (hls->format_options_str) { ret = av_dict_parse_string(&hls->format_options, hls->format_options_str, "=", ":", 0); if (ret < 0) { + av_dict_free(&hls->format_options); av_log(s, AV_LOG_ERROR, "Could not parse format options list '%s'\n", hls->format_options_str); goto fail; } -- 1.7.1 _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
