From patchwork Wed Feb 24 11:14:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nachiket Tarate X-Patchwork-Id: 25948 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 7563344B43B for ; Wed, 24 Feb 2021 13:15:29 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 39C2B689F3A; Wed, 24 Feb 2021 13:15:29 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 13281687F85 for ; Wed, 24 Feb 2021 13:15:22 +0200 (EET) Received: by mail-pj1-f51.google.com with SMTP id t9so1081379pjl.5 for ; Wed, 24 Feb 2021 03:15:21 -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=XLKfUe9fSySlUectETpjYytQ+VaipRidLimjZIZxtkY=; b=gXicpf6gx5Ibsh1Ss+fi45VZAtvqrDk5jR2fscWiPj8zXpI/d/HzifXSzE8Q+RVNMl 5S1Y8EKGCML68CKCD/d0sLCvR7XbUrVqqxl6Gg04J9zrVhsJu3m8zSGxpYS5UTiZS3Fu sn6ARAa8HGrPgrr5qAvJYn3rn1we1b2duz/qOTSK+hPNbXtwoSOMsEFTvutxLu5nNJbc Ee0+E88Xdgmr1pKkJnYK32WZotSzCqKWdWVSLGjmgGAYJRLOX706WKxc6mi0H2hDG8Nd VtMwVByMN0ED4CEj2hltS6KCNW96KoreY4kLuN3XzwdZPQ0imSqTrdi93OxDIDX1dgKz v0dQ== 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=XLKfUe9fSySlUectETpjYytQ+VaipRidLimjZIZxtkY=; b=hSaMhESM8XSP39q2sWF52h7O/zt0kPJ8XemD8fYLiHlNouybbWprBit3zgX1GynbTM 8DjJtf3emkMek0gC0y47qPMKTYg61KLEOftTPZ4ZlC85Q66E8d4+2XmPQnWRhcIivPDi SUBJJvEZ3h4WoyvNpmSwJ/5Y1Q0kHB21efEf8LqkaXQK6zpr0NRPzqBxJif8XuxgLswc 48gqGj+dHpNLjq4MTyQvnTJ+ADASDAFc6FMLuieptMT1VhkErjMJQ10IkT94Cj7nHnn+ 5JqAzls5PIA6N3QxsQi23WxrMj9/+ld3Lf2wWjTt3vNPLUTtNK4j83KdDWZjQWRrPx3I Wltw== X-Gm-Message-State: AOAM530pqe4a5LNr82jlhnUAiYroilQqZ+kS7a/t7LW7BFjAcSVjit21 x+yzESk5apQmqW3jcVnpvs2N7Msz770TbA== X-Google-Smtp-Source: ABdhPJzCw4opy/z8IPCkU6fdaUVWpDGBydCYpoiPyOT0818GxcAfbcjLpsGAOcru4wQAJDFkhNY4gA== X-Received: by 2002:a17:90b:4a44:: with SMTP id lb4mr4066883pjb.92.1614165320180; Wed, 24 Feb 2021 03:15:20 -0800 (PST) Received: from localhost.localdomain ([2401:4900:30cc:e650:919c:9fb8:da64:18ab]) by smtp.gmail.com with ESMTPSA id c8sm2447013pjv.18.2021.02.24.03.15.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 03:15:19 -0800 (PST) From: Nachiket Tarate To: ffmpeg-devel@ffmpeg.org Date: Wed, 24 Feb 2021 16:44:56 +0530 Message-Id: <20210224111456.9774-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 3cb3853c79..d612ebb185 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); } if (seg && seg->key_type == KEY_SAMPLE_AES) { @@ -2096,7 +2096,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;