From patchwork Thu Jan 28 15:14:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nachiket Tarate X-Patchwork-Id: 25231 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 8AF1144B50F for ; Thu, 28 Jan 2021 17:18:22 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 66AD168A558; Thu, 28 Jan 2021 17:18:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 94E6D6899C9 for ; Thu, 28 Jan 2021 17:18:16 +0200 (EET) Received: by mail-pg1-f171.google.com with SMTP id s23so3214571pgh.11 for ; Thu, 28 Jan 2021 07:18:16 -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=r9KdMnsHMP+6aTKby4tFobvnOze5qPjqJOvP5PXmPyI=; b=Q0fhy4SBmkxhjravUehzHnyX9hL2+CE5z1cQtEqyuwo7ubwKgWg0JKQcYtbUeiDEek sxoyJmNlluinKG9QC1Zs7BbSbtqwbxgxt1y9GF/GxcoaUnbSJ4jSeZe6NcL4agivR9zF i8TtlwW0/9cNiu51WX42OePG8aZ0itMD71TcpNeU7eduBCY21hMGm9EDcaLjKejOkOYd s0rAqh76+HqFPTUraT4KDRLXHWxnkD/PelLWQhEDUvJCrjLtpkvOlxv6/WfadKgRxkqv DCoz6ESoRETRK8/qL4UdOPg/F/mnkHMEQ0rnrW2VFk8c7xamquiQri2KvTjBQb4lN4yB CyHA== 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=r9KdMnsHMP+6aTKby4tFobvnOze5qPjqJOvP5PXmPyI=; b=NHEIxpTdirSEAbA6+AhErBsycgx+SYsa2GyUkv/xGPS/pxdxLf9EmapKKJB3E5GQkl W4yiF0JKq7ISmZSsU7arX4dqtbDu41J0vftqrhI00h93KYdlYvE4IalHeD6K+5YpgtTL SZtxZpKECavfHvFS2OlEyJLi6PMp83Z4GXtSD/h+Fy4+XTgrPOj3WAjIcFDGyHXZBeIU lAHQCPDRqUI1NyUtOdqbBeUsEsVP4ew/TkXYJ/oTAVSVpdWFhiCVA4D5g0bFWJXB8e2q /3ZWau5EdkHNJSsdnM4Nyw5bOQrq2yYz5TWhmh96nT8ZZWy48AcZeeIoXdpUm0+T+Yb4 KBtA== X-Gm-Message-State: AOAM533ZJDBtVYzhz2l60Poc6YCEEBwUMld2fhY4nJxB2Q+4jnkYd60a z8xJF/utzkjsxLh/f0ZJdwA7azBR0G/koQ== X-Google-Smtp-Source: ABdhPJxl46FDqg75/c1aBI+b5ga0ojyTv2O7PXiRzRDu3FEjXVhF4q+8xc2TJFWHkx7X09mFGdnplA== X-Received: by 2002:a63:7f10:: with SMTP id a16mr80589pgd.416.1611847094735; Thu, 28 Jan 2021 07:18:14 -0800 (PST) Received: from lab-21.india.rsystems.com ([106.198.145.178]) by smtp.gmail.com with ESMTPSA id y21sm6448421pfp.208.2021.01.28.07.18.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 07:18:14 -0800 (PST) From: Nachiket Tarate To: ffmpeg-devel@ffmpeg.org Date: Thu, 28 Jan 2021 20:44:47 +0530 Message-Id: <20210128151447.18232-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 850068736e..281842e10b 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -2037,23 +2037,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; @@ -2088,7 +2088,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;