From patchwork Thu Nov 17 10:16:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 39318 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp997652pzb; Thu, 17 Nov 2022 02:18:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ZzA1BDaVVzVSYuuHcdj4fWxEvddoddPEQg+R0owlI72kkSpp9RqMBYD3Ur93qQrXTlyvv X-Received: by 2002:a05:6402:2987:b0:45c:a9d3:d535 with SMTP id eq7-20020a056402298700b0045ca9d3d535mr1595590edb.0.1668680286403; Thu, 17 Nov 2022 02:18:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668680286; cv=none; d=google.com; s=arc-20160816; b=qHnCMIH4VrxVayOmhFTGOuDo3ZYOXOEJmSqJo+l4iSsE213htrQ56iZs775DXbm3Q3 jlxTSTgNQGsKtzz5cdXd4c6wP5z7G1QsegyCx5Kx7kmCm0GAe9n9IW+wzVBv8/XYm5Kd SESSvOGqj07TnEhaeRHc1BB3FscjDWjTBkZ5xaS7dC5ByyuOmjvyAb6rxwpPcWRV1Yje NFgYMNZQcFFvUMdY+kftIGENkFlZ5+ZnBVtZoaqLV91vNCWiZzsFYitvqaVDxaYS1u2V pn1mzRMnHQeu4DYntRv4963lt6+up1IOYaJUVFoRGHD5mm3gyNx/jh41Ouef7x/9ecXA ClWw== 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=OIkxyKuAZf9kwRRcOjLYApGDnBOOv3daghxmk7FHiaQ=; b=gXhsRO7+++u+tIGoq/up/kbuCdndMP3D9VDcuJPDzbWWLsWHKt9WuzrEpFsGTc/Dr5 JOJof3MBc8GkT00IvSsC8LJHAwzEC98yzCAq/6DJiUHIbZTHm5EN8nu4C+fKCIQAQnwH Lj8LpKzYunMNpKMNFYQTBL0UuPHxU0Ajfom21qhBG0D33KzW/459bS3f3SJM0bPMBNJA I8sVmtnPSTh/Ku6uzI1qpMKL6kbdsKPYiV2qenGQcK07ob3T9bJEIXmzYft0r7IDDA+H 1Gi4ZcftKH8GZo0FX9gyIF4sBv2AND1M9/3WZwcb215Is9s/Z0QzgQM1gckCnN75pDv3 UydQ== 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 o10-20020a056402038a00b00467c3cbab04si524848edv.66.2022.11.17.02.18.05; Thu, 17 Nov 2022 02:18:06 -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 7908D68BDE8; Thu, 17 Nov 2022 12:16:59 +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 CAD9F68BD8D for ; Thu, 17 Nov 2022 12:16:49 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 25D122406C7 for ; Thu, 17 Nov 2022 11:16:48 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id ApeI_oI6KsQi for ; Thu, 17 Nov 2022 11:16:47 +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 719192406CC 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 3DC043A0656 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:37 +0100 Message-Id: <20221117101640.6789-7-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 07/10] fftools/ffmpeg: do not assume input streams exist 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: YtdpCBSt7B58 There can be zero input streams, with input provided by lavfi complex filtergraphs. --- fftools/ffmpeg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 0944f56b80..c43c3ca3bc 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3401,7 +3401,11 @@ static int check_keyboard_interaction(int64_t cur_time) if (key == 'd' || key == 'D'){ int debug=0; if(key == 'D') { - debug = ist_iter(NULL)->dec_ctx->debug << 1; + InputStream *ist = ist_iter(NULL); + + if (ist) + debug = ist->dec_ctx->debug << 1; + if(!debug) debug = 1; while (debug & FF_DEBUG_DCT_COEFF) //unsupported, would just crash debug += debug;