From patchwork Thu Jan 21 19:42:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nachiket Tarate X-Patchwork-Id: 25056 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 3F6E544B081 for ; Thu, 21 Jan 2021 22:38:14 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0FAC2689C96; Thu, 21 Jan 2021 22:38:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CBFD0687FDA for ; Thu, 21 Jan 2021 22:38:06 +0200 (EET) Received: by mail-pg1-f173.google.com with SMTP id g15so2115943pgu.9 for ; Thu, 21 Jan 2021 12:38:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=zjQTZeiOTGOk8or0YdJ1Q1mCYLl4tGd+FVYqzvlJWfQ=; b=BTfmkjxyaVy0tfjHGauVvkK7vQ2ayGpH7hHeWjOVjWyv2VGKuM3RHgcyHjM0T/yVxe 2CEk0GoGvF/iKqSwc0eSRzgTxzYx1nstRoI9mI3KP1LjjoaFOlOl4I42pMP6ilp2mpKg CtrGZYefht5rSDRsSq3DYHyBaAapXp5GDruemK6IhbRduj8OLjNsJlgBWKe70BmIMMa3 5cON6c30cLEm8O4KRs54fqoeE2N7WA5Xszw7bBDgnET/E5s7ZZ9bvMnTqUrjZHSGScJK h8Ojo+EQoYPemsyTQbcp5JjCZsnFdDsj5QlKDeEhFKaKzEzFFl7xUfCskIElHZxeo+Nm n23Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=zjQTZeiOTGOk8or0YdJ1Q1mCYLl4tGd+FVYqzvlJWfQ=; b=E0SJRKQJLEqJ+5MWRaxy4z06Xw9T2kxoKATrmKq7fHRgrf2DLSvCwbzXeL0tt0Nf4h mthlusO2vtnO5h+asKzs2yC+3TiTBkClTqutPmW8NujFCRFb70OewZ913942S3HX8FCx kXI6IK+nWNK8LePA7XjOxrD5dBOVLHu1UwCEYyAY55kIvQKfCrit/nV5aw3hYOYwrpWP DPtKe/2fqVCBFg2N0mSfkvpLWlDYNNf37VsepGpzaMn7ZsWktYmwVp4drkg1Jq3hwXGd fok0CcrppAi7bjoMuL9r0wpi8tmk8QZxoOQSVpGJs4F5VsxiCcdLQ1/ODub44hLTVk/t 9Kxw== X-Gm-Message-State: AOAM532w2EmixEtml7PprgWW2jZc+aV6s59DKL70+3Mo54w0fpUyi0XG 1Ik9Td10YkrYxL22wq5AqzB1OXgQdgF1/Q== X-Google-Smtp-Source: ABdhPJxPH6nAsrKqHaVYqJxl1S1ZoIMvybTGGzEysfS+/s0JZ0aozZ8y4Bjx/gCTyXRdpCXdKKPfJg== X-Received: by 2002:a63:fb49:: with SMTP id w9mr842807pgj.403.1611258195365; Thu, 21 Jan 2021 11:43:15 -0800 (PST) Received: from localhost.localdomain ([2401:4900:30cf:cfd2:dd47:1715:856f:2bb9]) by smtp.gmail.com with ESMTPSA id c5sm5087270pgd.68.2021.01.21.11.43.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 11:43:14 -0800 (PST) From: Nachiket Tarate To: ffmpeg-devel@ffmpeg.org Date: Fri, 22 Jan 2021 01:12:58 +0530 Message-Id: <20210121194258.13713-1-nachiket.programmer@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH 3/3] libavformat/hls: correct indentation 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Nachiket Tarate --- libavformat/hls.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 9e7f020cea..a2efa18b07 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -2028,23 +2028,23 @@ static int hls_read_header(AVFormatContext *s) break; } } else { - pls->ctx->probesize = s->probesize > 0 ? s->probesize : 1024 * 4; - pls->ctx->max_analyze_duration = s->max_analyze_duration > 0 ? s->max_analyze_duration : 4 * AV_TIME_BASE; - pls->ctx->interrupt_callback = s->interrupt_callback; - url = av_strdup(pls->segments[0]->url); - ret = av_probe_input_buffer(&pls->pb, &in_fmt, url, NULL, 0, 0); - if (ret < 0) { - /* Free the ctx - it isn't initialized properly at this point, - * so avformat_close_input shouldn't be called. If - * avformat_open_input fails below, it frees and zeros the - * context, so it doesn't need any special treatment like this. */ - av_log(s, AV_LOG_ERROR, "Error when loading first segment '%s'\n", url); - avformat_free_context(pls->ctx); - pls->ctx = NULL; + pls->ctx->probesize = s->probesize > 0 ? s->probesize : 1024 * 4; + pls->ctx->max_analyze_duration = s->max_analyze_duration > 0 ? s->max_analyze_duration : 4 * AV_TIME_BASE; + pls->ctx->interrupt_callback = s->interrupt_callback; + url = av_strdup(pls->segments[0]->url); + ret = av_probe_input_buffer(&pls->pb, &in_fmt, url, NULL, 0, 0); + if (ret < 0) { + /* Free the ctx - it isn't initialized properly at this point, + * so avformat_close_input shouldn't be called. If + * avformat_open_input fails below, it frees and zeros the + * context, so it doesn't need any special treatment like this. */ + av_log(s, AV_LOG_ERROR, "Error when loading first segment '%s'\n", url); + avformat_free_context(pls->ctx); + pls->ctx = NULL; + av_free(url); + goto fail; + } av_free(url); - goto fail; - } - av_free(url); } pls->ctx->pb = &pls->pb; @@ -2079,7 +2079,7 @@ static int hls_read_header(AVFormatContext *s) pls->ctx->nb_streams == 1) { ret = ff_hls_parse_audio_setup_info(pls->ctx->streams[0], &pls->audio_setup_info); } else { - ret = avformat_find_stream_info(pls->ctx, NULL); + ret = avformat_find_stream_info(pls->ctx, NULL); } if (ret < 0) goto fail;