From patchwork Fri Nov 16 08:57:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jeyapal, Karthick" X-Patchwork-Id: 11038 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 9EF2944D03D for ; Fri, 16 Nov 2018 10:57:39 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2B7F868A28C; Fri, 16 Nov 2018 10:57:40 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from a2i836.smtp2go.com (a2i836.smtp2go.com [103.47.207.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 13EAC689EBB for ; Fri, 16 Nov 2018 10:57:34 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=m78bu0.a1-4.dyn; x=1542359559; h=Feedback-ID: X-Smtpcorp-Track:Message-Id:Date:Subject:To:From:Reply-To:Sender: List-Unsubscribe; bh=kmyPA/NcP/gevJ+1dkzbgI/3fN6bCNY0O+2l6nBIl+M=; b=blR5J1NC LAEqUl+7479slawmQDhXBcfdkJLd+U7DnUtA8UzVFfcbbfCE4da8uuU3ETvIK0bG12ps9cNFapFFB EoXHezmIfUmNN6B0GNVLQCqQxdtch6MdBjH3Gke1yzF1HkTbPwYopCQRrbQnWzy1DRZJewtwE+lci c/PtDda45x97H+yd4jqnzCMApQy4xfoJKM8rmb/3dmKOQ8xZP0avuL6BlXVA+8nc+vn0Hxu1TZjBH 84RgkuQg3tt7HcuKjhIC5IAdHtuyCG7m0HM1xhKgbAr2jaq6qVkRfetxkzJe8i336+s0vU6EuNM92 NmUT/hV1Kouotr3ONEKFJwprlg==; Received: from [10.66.228.43] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.91) (envelope-from ) id 1gNZwT-SH4gqy-3r; Fri, 16 Nov 2018 08:57:33 +0000 Received: from [10.63.208.195] (helo=blr-mp4tf.bangalore.corp.akamai.com) by smtpcorp.com with esmtpa (Exim 4.91) (envelope-from ) id 1gNZwS-wSES1H-3T; Fri, 16 Nov 2018 08:57:32 +0000 From: Karthick J To: ffmpeg-devel@ffmpeg.org Date: Fri, 16 Nov 2018 14:27:12 +0530 Message-Id: <20181116085712.26198-2-kjeyapal@akamai.com> X-Mailer: git-send-email 2.17.1 (Apple Git-112) In-Reply-To: <20181116085712.26198-1-kjeyapal@akamai.com> References: <20181116085712.26198-1-kjeyapal@akamai.com> X-Smtpcorp-Track: 1gNZwSwSES1H3T.7sZ9mwggR Feedback-ID: 337386m:337386asVRLGB:337386s0I2miovvs X-Report-Abuse: Please forward a copy of this message, including all headers, to Subject: [FFmpeg-devel] [PATCH 2/2] avformat/http : Added check for valid URL context before calling shutdown X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Karthick J MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavformat/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/http.c b/libavformat/http.c index 3a35bc7eac..240304f6e6 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -1650,7 +1650,7 @@ static int http_close(URLContext *h) av_freep(&s->inflate_buffer); #endif /* CONFIG_ZLIB */ - if (!s->end_chunked_post) + if (s->hd && !s->end_chunked_post) /* Close the write direction by sending the end of chunked encoding. */ ret = http_shutdown(h, h->flags);