From patchwork Wed Apr 19 19:52:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41269 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp744560pzb; Wed, 19 Apr 2023 12:55:22 -0700 (PDT) X-Google-Smtp-Source: AKy350a/pj0R/X8cJ3Tuy6Wcw/SKCaVDlWKS30J8hcI6LYLQKksfS58h9SHmKv0wwAuOTDK1tcPr X-Received: by 2002:aa7:c857:0:b0:506:bf2f:65af with SMTP id g23-20020aa7c857000000b00506bf2f65afmr5967827edt.24.1681934122083; Wed, 19 Apr 2023 12:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681934122; cv=none; d=google.com; s=arc-20160816; b=wNedqh8cn9hzRxgZn4oqzlLFb0Bmlkjr1hLIZqKjdsnKSh0WD4nTrMsLbGTusYiGoP PN/QI9WRXDYNobGin0r2qo1QiwiJ2iCb2SGWPjfOi9G8KMHFhuqS+3aYq9jbbkRL/wpq d6+KJN+A62nL1cmWl00G5cexpIFP97H74/AsVgPFZF9gIzzgOBRn9u606B/R2KHvc+pG VXE6yt7P4bctFYVbubZf5RBjNLw2ITNZHlJHKVmg66iDf5fACygvN1x6sWRI+4y+H7Is jEXzB6DJxkSKXaNhXD7Ep3buq9vhbeAtavynBQjTbZ49Qjd7pYhJhIhB1F+1TL1dfjLk nKVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=T5iC974IrWCut3XlShqJqjP3IgEOEQpSib8VCKHQ8+A=; b=gyDwEDYWVGnEhr1nV9XwHCU3j9TcLbaEGbiTO1yWyMBsFk+R0MvYgZDbP78QP2+6S4 m88tJkitZBlAOJY4Z51twFVnM4q3fVBik0jGMo6l7OodIBalOH7+IfgUKDWHeACJFnM9 YpQ/rtLeUzq9VoG/afw0CJR/lb+LKzncXxqWwj3oYh+IUazbfiWviw3ChuVm3bM8jYLS rRiHKRUs0hmGdKvKKdsL7XCVO7FEwhchGZYptE7n7OJcKDamn8ft7tKL2y4znU//YCWW P688m9uQt8FXgh5TvfkVwfmR38yiHlGe2r9se8xjsAjYOFHBaqojq9tIQ8VV403mrez1 NQAQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id p22-20020a05640210d600b004fd1f069ba6si15978992edu.560.2023.04.19.12.55.21; Wed, 19 Apr 2023 12:55:22 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5EF1E68BF5E; Wed, 19 Apr 2023 22:53:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9BC3A68BE76 for ; Wed, 19 Apr 2023 22:53:02 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id D8558240591 for ; Wed, 19 Apr 2023 21:53:00 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 6zM8Q99tWMOf for ; Wed, 19 Apr 2023 21:53:00 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 15D292406CB for ; Wed, 19 Apr 2023 21:52:56 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 00F933A13BB for ; Wed, 19 Apr 2023 21:52:56 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 19 Apr 2023 21:52:33 +0200 Message-Id: <20230419195243.2974-15-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230419195243.2974-1-anton@khirnov.net> References: <20230419195243.2974-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 15/25] fftools/ffmpeg: reindent after previous commit 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: bGsYlAo6UgfE --- fftools/ffmpeg_mux_init.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 28254cb49b..ad5a451581 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -128,21 +128,20 @@ static int choose_encoder(const OptionsContext *o, AVFormatContext *s, return 0; } - if (!codec_name) { - ost->par_in->codec_id = av_guess_codec(s->oformat, NULL, s->url, - NULL, ost->type); - *enc = avcodec_find_encoder(ost->par_in->codec_id); - if (!*enc) { - av_log(ost, AV_LOG_FATAL, "Automatic encoder selection failed " - "Default encoder for format %s (codec %s) is " - "probably disabled. Please choose an encoder manually.\n", - s->oformat->name, avcodec_get_name(ost->par_in->codec_id)); - return AVERROR_ENCODER_NOT_FOUND; - } - } else if (strcmp(codec_name, "copy")) { - *enc = find_codec_or_die(ost, codec_name, ost->type, 1); - ost->par_in->codec_id = (*enc)->id; - } + if (!codec_name) { + ost->par_in->codec_id = av_guess_codec(s->oformat, NULL, s->url, NULL, ost->type); + *enc = avcodec_find_encoder(ost->par_in->codec_id); + if (!*enc) { + av_log(ost, AV_LOG_FATAL, "Automatic encoder selection failed " + "Default encoder for format %s (codec %s) is " + "probably disabled. Please choose an encoder manually.\n", + s->oformat->name, avcodec_get_name(ost->par_in->codec_id)); + return AVERROR_ENCODER_NOT_FOUND; + } + } else if (strcmp(codec_name, "copy")) { + *enc = find_codec_or_die(ost, codec_name, ost->type, 1); + ost->par_in->codec_id = (*enc)->id; + } return 0; }