From patchwork Sun Aug 1 14:54:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nachiket Tarate X-Patchwork-Id: 29162 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6c0f:0:0:0:0:0 with SMTP id a15csp856044ioh; Sun, 1 Aug 2021 07:55:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrqpraf+iQOjzGI4wwtCjtZeyiMmN2wD53JAaELEnbD6tsOpd8RSY46SeeZ0YHTDFwNMHw X-Received: by 2002:a05:6402:100c:: with SMTP id c12mr14225829edu.326.1627829719013; Sun, 01 Aug 2021 07:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627829719; cv=none; d=google.com; s=arc-20160816; b=YKQiHPgfE+mmk5Nu5CL77sBWxdNCPK0dCmOCVnXPEh+S++aodjEzfz1wMx+6Qy3e+C 8i2ovBTNBOSqT1pm5dQ6lITEr/iPg1GLKeVVW6+KPCFvQEcPtT1MjcQel2U2ErOTACTC pP6T4VHzrk0rKy0PV51k5+0P6unCU8uCKWLtBUOvGdL2r2LaF+ov60KD7iYxbQv1CeRK kGTOwtlFkh6yuTKMO/l+ADtKJery7G5MvIEwylF80F1JUpwMtihvIVlESvBSghgPzSTf fbuOUkVICkbF0YUU3K3INsOyJINUnIlfQYgNFWmqyhyXk0/PP8XDJKTH/+E3+CI1nmq5 kwOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=wOanLjywALz3WUuYB+6l2zgBKJDlCCX5wqaicXbVVyE=; b=haJInRGOuo2KbQJJ/0EkEqbNvt49ggHQzPdJG8pWqkfUriwNrxeh6AX75W+160Norr SZoQaH7cqQ/v8bKRcf/hpIPIyueUf6rC94kQZ72d9Mg5L3twAazDWqoSgc7qSdJZyuEA aXeQM66ftCyTPDeVWtbu4Q5qKGBpez2kskpNLE0KBoBMdZ1AukWEnZjy8nplNSkRFyAv Q8PJYo/zDDDisIDGoCya6Rd9jt9p86GX6k/54oV7PnAiCGs4ywOWZueYBzGdd5g6h8ar 7GeLdxAMaaOQSOXKUWupEWg/f8eI0QY92AcGKEw1AbRdVvCk4F4Af/dShlg3/RDZfzCx T/Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=kH8ZHn3g; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ov18si7047257ejb.417.2021.08.01.07.55.18; Sun, 01 Aug 2021 07:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=kH8ZHn3g; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 59C3E68A5DC; Sun, 1 Aug 2021 17:55:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 13D9868A5A2 for ; Sun, 1 Aug 2021 17:55:14 +0300 (EEST) Received: by mail-pl1-f169.google.com with SMTP id t21so16675926plr.13 for ; Sun, 01 Aug 2021 07:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=erHUTjZLlzj5ftXMrMYW8XK3/GV8xXASVU3OEtacL9s=; b=kH8ZHn3gFxyN8rs5YxGJbPW44Saq//MDJhe1Uf0cQkMUziPC+KF/yMZUAwyLtjMrl2 cM6Zl201HsKKeXf1/InRmpw1ROeOMQMcC0xpU9H5Dp9oiAItGKhqPXYcsww5+OxaaqyW 5oNcG7Vmtx5hH2w4E3pLaPJI3yue77h2BYGw4VzMlD8Mmq4IcQLzvfn+POZylMK0eANl E6+ULqHjSmNa0tuLX/JPZBLyIy/YvDGzZRTqe/Aoj0AZJWTUcy7Cf2AyILcUJTHj6m4Z KZC0hbkQ8RvrfVlgRL/71/0cxw9ch/UQMwipKU6F6RyvTwX7cGjUlGyjopCxwlWXmOXO 6pLQ== 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=erHUTjZLlzj5ftXMrMYW8XK3/GV8xXASVU3OEtacL9s=; b=RVUymzqDbcfSeuyujjXI1ZIfpZ1EnwgFd7cS/8sFF3TQgQVh9jgNAbT375pEEwhhgG yDd8aaSlq2OmdotGqUHlKivfkXgDxnU7X2OR9A1IELL5GM5xtmnp2/Uq8hGrpqlf8gyO 3RwFR2VTX9gzScG17m8kl6hQUQnHU5+tyKMCLHe3G1BXj25t/mvAZNKzd5Z7gf+XsoOH wnlzVcJtCxuwUGTrVdDz9KxfcAAxI4iIIw85ENoFzvUqKIqYa6cqHXj6iBGEpAYGTiUw fQhW6he1yvFErYgzPCs56Jwx+KzqrdyWXROPw6qAh4rMuZpap2sRMepOPcM12/ztxKxV W3ZA== X-Gm-Message-State: AOAM531DP52XpJ5b0U90RVmSmBMGKn9Esfedjb26lPWgDR5eTSgvQFUr 4i2poukgJWNaXaDdU+lAMCTXHmqWThnLTQ== X-Received: by 2002:a17:90a:69c5:: with SMTP id s63mr12895760pjj.190.1627829713011; Sun, 01 Aug 2021 07:55:13 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:445c:2b5c:adf7:1067:f5db:d755]) by smtp.gmail.com with ESMTPSA id b15sm9674971pgj.60.2021.08.01.07.55.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Aug 2021 07:55:12 -0700 (PDT) From: Nachiket Tarate To: ffmpeg-devel@ffmpeg.org Date: Sun, 1 Aug 2021 20:24:53 +0530 Message-Id: <20210801145453.15464-1-nachiket.programmer@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH 4/4] libavformat/hls: correct indentation X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: qP8QLm5B30FA 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 022dae0391..7e457281f4 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -2051,23 +2051,23 @@ static int hls_read_header(AVFormatContext *s) if (in_fmt->raw_codec_id == pls->audio_setup_info.codec_id) 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); + return ret; + } av_free(url); - return ret; - } - av_free(url); } if (seg && seg->key_type == KEY_SAMPLE_AES) { @@ -2121,7 +2121,7 @@ static int hls_read_header(AVFormatContext *s) pls->ctx->nb_streams == 1) ret = ff_hls_senc_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) return ret;