From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 98FF4456B2 for ; Fri, 17 Nov 2023 13:30:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E3F4968CD25; Fri, 17 Nov 2023 15:30:27 +0200 (EET) Received: from smtpbgjp3.qq.com (unknown [54.92.39.34]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 22D9F68CCF9 for ; Fri, 17 Nov 2023 15:30:19 +0200 (EET) X-QQ-mid: bizesmtp69t1700227813tkv5913p Received: from localhost ( [221.216.148.250]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 17 Nov 2023 21:30:11 +0800 (CST) X-QQ-SSF: 01100000000000Z0Z000000A0000000 X-QQ-FEAT: C46Rb8GPIEdW+d+o96m0cqicHCljijw3yrfBtrFIEnunxtvwRmOejAurhvXmK n4o5nxLMyg1DUK/+XoxeHT7/GftJ6d7meTgMgZEnZDJTUaXmbGCPdmGp/qjw9bcSeqVhSef 5mY/TM1adDoNIwEcoyUN1jqUJV5s1QfdomfRIcnbqa/ekZVO6/bm8Bj4og+m9ubGBzIh2Bl SvVR5VZRr481/JSci7Goc5bxiTMP+5ZOXlHCpvzzwaQdiBTR5PQvvjYat00soffof0Pxjro 40RDJQkg6vBxqB1jF/XrRgBVKoI9hXMqusEm8Z4M+76PmhBuGIKlFuxwIqWcQbFUq+JXBxY UiciyORNZOvGpQBnh4MUwT3fNLTcrPGRrGtLS+K3kJqOI4VIBuoL6Y7nmG6c/eBg1oiYTMh X-QQ-GoodBg: 0 X-BIZMAIL-ID: 7592350863948286599 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Fri, 17 Nov 2023 21:30:09 +0800 Message-Id: <20231117133009.66968-1-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.39.3 (Apple Git-145) MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybglogicsvrsz:qybglogicsvrsz3a-0 Subject: [FFmpeg-devel] [PATCH] avformat/hlsenc: remove unnessecery av_dict_free operations X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Steven Liu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: The option will be freed at the end of the hls_window function, And will go to fail label call av_dict_free if every open operation return failed. Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 7049956dd7..27f558abd4 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1588,7 +1588,6 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs) set_http_options(s, &options, hls); snprintf(temp_filename, sizeof(temp_filename), use_temp_file ? "%s.tmp" : "%s", vs->m3u8_name); ret = hlsenc_io_open(s, byterange_mode ? &hls->m3u8_out : &vs->out, temp_filename, &options); - av_dict_free(&options); if (ret < 0) { if (hls->ignore_io_errors) ret = 0; @@ -1647,7 +1646,6 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs) set_http_options(vs->vtt_avf, &options, hls); snprintf(temp_vtt_filename, sizeof(temp_vtt_filename), use_temp_file ? "%s.tmp" : "%s", vs->vtt_m3u8_name); ret = hlsenc_io_open(s, &hls->sub_m3u8_out, temp_vtt_filename, &options); - av_dict_free(&options); if (ret < 0) { if (hls->ignore_io_errors) ret = 0; -- 2.39.3 (Apple Git-145) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".