From patchwork Thu Nov 17 10:16:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 39307 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp997086pzb; Thu, 17 Nov 2022 02:16:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf4O9eK0JujHPsaXMgRoaJ8CqeA8Xu4Y0J/qeeIFYe0aXLV8HocWAXzMoWeCYP5buiota+0c X-Received: by 2002:a05:6402:3205:b0:467:3015:ad42 with SMTP id g5-20020a056402320500b004673015ad42mr1579273eda.259.1668680213974; Thu, 17 Nov 2022 02:16:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668680213; cv=none; d=google.com; s=arc-20160816; b=sPChBYc8V7/KLxnF/KZTWb/CWzheGsXzfVdjHI053BKn6fxN+wG3HecELL9WgMU8b5 4Q3+mkbiXAzkUZ5J+YPsd2o2d18srFovTYTnOZrBFjGwq23pvV7YsQkxoCXNX0cY9uFl hGtG9TiBqmI2ak2lI2wwSz5oAPsLocZW5xYO4Rnfb4xt4dr7q5cg4/pEq4IaRizkkFf0 u3xZzLTwWOLPDfpFpq5ZMuPOviihD4ETtegeQnOcSVG4XF/Je/QBtoxF11jYmug5a7j3 p57n2J/bEeU3G6GdKHo5cLz03mAVVyvzFSIf+1Xso1r4Gfc+xENrXZWmNpTNlqAip6Kv 1P2g== 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=j1v7w/XUdn5BaxNlK9G2dGblJ54nBy7eSdKoVZTw8Yk=; b=I0dcMfvS3BApB3xuFBp0sLg7JHmcpCEOWR9SeDu4uy0OW7tqvzphNVmPsG/9YnOJh4 F7cRzQoQfhezxgoaAvyaCVr9nlQRMIRe5McYbSHDtF5NknzI2febAVpzYKCsVABk5Ygb D3SiDN73ZbwY7EGCiA+BeBbcOiX1MWM9Jhu29MGpLDjMcK6YYi0EZUtR/X7lqY+Z6qyw 9V75nXFJK2kbSHaWeZzKB4gzG+Dc93yY+kZYj+eOkPoagVYMNQ1qCkAKP7KRTF+iwq56 TpY0Lf8XAzOvBxVNiPbWceM5DWxR7Our3kO8YWPThvn04rqBotWSiGX4kcpY5+tFyp81 /7Dw== 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 hz1-20020a1709072ce100b007894b9de062si268940ejc.631.2022.11.17.02.16.53; Thu, 17 Nov 2022 02:16:53 -0800 (PST) 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 391F668BCBB; Thu, 17 Nov 2022 12:16:51 +0200 (EET) 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 0497E68BA62 for ; Thu, 17 Nov 2022 12:16:44 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id BA93A2406CD for ; Thu, 17 Nov 2022 11:16:43 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id wRo8VvWMx80O for ; Thu, 17 Nov 2022 11:16:43 +0100 (CET) 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 3B3C0240499 for ; Thu, 17 Nov 2022 11:16:43 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 01DED3A02FD for ; Thu, 17 Nov 2022 11:16:43 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 17 Nov 2022 11:16:32 +0100 Message-Id: <20221117101640.6789-2-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221117101640.6789-1-anton@khirnov.net> References: <20221117101640.6789-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 02/10] fftools/ffmpeg: drop an arbitrary condition 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: VGq4qstCJpPF Encoding init code will currently fall back to a 25fps default when no framerate is known or specified, but only if there is a known source input stream. There is no good reason for this condition, so drop it. --- fftools/ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 25155e155e..2c4dc83f03 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2877,7 +2877,7 @@ static int init_output_stream_encode(OutputStream *ost, AVFrame *frame) if (enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO) { if (!ost->frame_rate.num) ost->frame_rate = av_buffersink_get_frame_rate(ost->filter->filter); - if (ist && !ost->frame_rate.num && !ost->max_frame_rate.num) { + if (!ost->frame_rate.num && !ost->max_frame_rate.num) { ost->frame_rate = (AVRational){25, 1}; av_log(NULL, AV_LOG_WARNING, "No information "