From patchwork Sun Apr 11 19:11:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nachiket Tarate X-Patchwork-Id: 26870 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 5E1B94491D4 for ; Sun, 11 Apr 2021 22:42:41 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 35EED68817D; Sun, 11 Apr 2021 22:42:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 766696805BE for ; Sun, 11 Apr 2021 22:42:34 +0300 (EEST) Received: by mail-pg1-f180.google.com with SMTP id w10so7708811pgh.5 for ; Sun, 11 Apr 2021 12:42:34 -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=TS5+fBaTATwhiTOyr2rjqEAC//oludMx2vC47i1ih68=; b=M1X6sKE0PQFmK2R44nkla2WX+hgSR5RBLXfwvCE3LsZYGR/8bg96i/GT6YYlgurZvU g6WGRZu1zkRtM+UeIS9LYNQGsdjOl+2OfY+4cHCh4MHEGDh6hCU42F7AxWW+FhG5eLnd YjwZzSFGJDLo5+MbN4T/l4exMYvTJVdESUsufaIv2lVAYNhUEBEo3CnyZTXVLDP9A41L TxqMLUBPWN29CufkHQPzbrYLSA3wRxiJt6vLXV1XIgohoPhr4Mt9+ulEZLrtQIExNys+ +RcgLSwtnRYrmlPw/Rpw6aNgMguxBVyU4xlqyejEdh4CHGO12EPafUwVM+fNFK4DARXl QC7w== 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=TS5+fBaTATwhiTOyr2rjqEAC//oludMx2vC47i1ih68=; b=QRG/prWHZi6DDHz1mdBamjt2vvRe1X/MSBNcuJh6Gwcv7ARXd643o2iiO9YG9PuzSO rNyRKd56xsoCmxWIpJs3Rv++Pi33s3h7r4YP/6YTJgcvpYoTawhjDAy7SkxIG6k5BPWc BsSnsjLwo9riUNSwKbR8daNvvHiKlgh0+1RIuT9UJ7YzcUwHnVAGUfSioUp+cFSluwlQ lp3K7G7CuX9Prsgtd9u8H7j0yMlPaeOQk8Q+n6QgnCqCtXsykpvwIRlry8XYPojmjes2 ompobiJiYG+kCpBRzwjF05XBn1dcu4P5u8fGsXd9evPDZpJPuaw78ZrvJ3GDx7xiBGKq XrOg== X-Gm-Message-State: AOAM530YTNenOBiMYVrdnhARbdqT7CrcJcfCTIoL33cfMHLL7OPpcZRv +zKpKz+rnGBNFV1pJX8rrUHUfuwOx0Prtw== X-Google-Smtp-Source: ABdhPJyopJ/piyPL329wCL1aswCAvPhP2/758ZilGP8u/7YpzTWxFwT24cJMNpxKzP8QbKU9baq2JA== X-Received: by 2002:a62:27c7:0:b029:204:7b11:3222 with SMTP id n190-20020a6227c70000b02902047b113222mr21140628pfn.34.1618168431671; Sun, 11 Apr 2021 12:13:51 -0700 (PDT) Received: from lab-21.india.rsystems.com ([106.198.214.134]) by smtp.gmail.com with ESMTPSA id p22sm8574917pjg.39.2021.04.11.12.13.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Apr 2021 12:13:51 -0700 (PDT) From: Nachiket Tarate To: ffmpeg-devel@ffmpeg.org Date: Mon, 12 Apr 2021 00:41:31 +0530 Message-Id: <20210411191131.17807-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.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 51b8da7c99..3c9a5bca90 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); + goto fail; + } av_free(url); - goto fail; - } - av_free(url); } if (seg && seg->key_type == KEY_SAMPLE_AES) { @@ -2119,7 +2119,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) goto fail;