From patchwork Mon Nov 26 10:25:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jeyapal, Karthick" X-Patchwork-Id: 11163 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 4F9AC44C5EC for ; Mon, 26 Nov 2018 12:26:14 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BEE0C68A3B1; Mon, 26 Nov 2018 12:26:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from a2i252.smtp2go.com (a2i252.smtp2go.com [103.47.204.252]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6FBCE68A38A for ; Mon, 26 Nov 2018 12:26:08 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=m78bu0.a1-4.dyn; x=1543228878; h=Feedback-ID: X-Smtpcorp-Track:Message-Id:Date:Subject:To:From:Reply-To:Sender: List-Unsubscribe; bh=QC8Mv+S45G4Oqt4exM6ujIeyGLClWSWp242AQi5CRpA=; b=qtI6SW9u ct6Aydr1oOHdkdONNLV1EkSGRnHBEhBRIJKR/0bx1VheWF2v8P/hVT+vl9rSEXWZjA6JujvlSUhem WhCvJ0rAUFbSdCPgKU22D57h8TDgJKp9ahZ9uPs+QAU7mlVONsYy2hZJU0FPsPRg5+llmBe/wNWCA nPLqT05oPAWAOOZ1cu3+Gt5EX5u4h78yQhFTXqP/3vKbP10hTLpMyHb5NETh2lKM4U/e2QLHDt9zK HhsCU4jtWLDYO0mGqp70MChGfTZfIroOWx19Ze64U+0su97rsjnL54Y/NKQXYv1hAcAFwuBy2Zfis GjdmholRiznEgAT9FjwPYiMluw==; Received: from [10.45.33.53] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.91) (envelope-from ) id 1gRE5h-095Ccb-3Q; Mon, 26 Nov 2018 10:26:09 +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 1gRE5f-rlZGcs-MM; Mon, 26 Nov 2018 10:26:08 +0000 From: Karthick J To: ffmpeg-devel@ffmpeg.org Date: Mon, 26 Nov 2018 15:55:50 +0530 Message-Id: <20181126102551.57188-1-kjeyapal@akamai.com> X-Mailer: git-send-email 2.17.1 (Apple Git-112) X-Smtpcorp-Track: 1gRE5fr_ZGcsuu.A4oAwZNgk Feedback-ID: 337386m:337386asVRLGB:337386sp_IkAfE84 X-Report-Abuse: Please forward a copy of this message, including all headers, to Subject: [FFmpeg-devel] [PATCH 1/2] avformat/dashenc: Handled the error from dashenc_io_open() 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/dashenc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 6ce70e0076..2f403257c0 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -527,8 +527,12 @@ static void output_segment_list(OutputStream *os, AVIOContext *out, AVFormatCont snprintf(temp_filename_hls, sizeof(temp_filename_hls), use_rename ? "%s.tmp" : "%s", filename_hls); set_http_options(&http_opts, c); - dashenc_io_open(s, &c->m3u8_out, temp_filename_hls, &http_opts); + ret = dashenc_io_open(s, &c->m3u8_out, temp_filename_hls, &http_opts); av_dict_free(&http_opts); + if (ret < 0) { + av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", temp_filename_hls); + return; + } for (i = start_index; i < os->nb_segments; i++) { Segment *seg = os->segments[i]; double duration = (double) seg->duration / timescale;