From patchwork Tue May 23 13:58:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41800 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c51c:b0:10c:5e6f:955f with SMTP id gm28csp600885pzb; Tue, 23 May 2023 07:00:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7RXtM83Ew5SV68jDJ3mmf3IhH9zNHaF2KxxOzLyD6cXzNxWbOseyperxYy8D92A4XVhwGz X-Received: by 2002:a17:906:4fd2:b0:94e:8431:4767 with SMTP id i18-20020a1709064fd200b0094e84314767mr13748313ejw.38.1684850419642; Tue, 23 May 2023 07:00:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684850419; cv=none; d=google.com; s=arc-20160816; b=eudBCkLeMOyKG8kgc56MMRaQKH3YNgSqMWgLShZacPv2QEPr8GU5jC4Ywt7BUbkUjK eHfJCPZ6kiThYj1L5cJk6eqcr/Lw//1/Csc5gNHau+zvPg7Nr+h9IKb4vtllgAe/J/4L iDBYhTylb2W+L4oa5+iuA2JflnOcTNyM6YaVgpZzL7pF29AYrH1IU7o2FDt0SoGvkquL b0VOAYX//SZH5sfiAVbsXtxBOCvgWeRcKrm8tQZ5uvm8g3viG63Bq7UA2RryvnuAtto1 bGg7A8L1COFRoBm5rzUPnsDUoK8lrympU+gePbg3XOgBP4Q0djXkPo5txeC6QaaNWNpA O0HA== 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=j7bL7m8VLCkeEXcGa++xvd8YEMQig7KuqCOAnCyG48g=; b=Lh5fRmjCtVw9NSphUTbL96q+9qTndQ1hzMDk53eKMyO6S36dOpmdAtPaBMIIyRp2bE woYgRqEQpuENk/50qygW7KiAG8SAv8DIQxAfR8j+d4SZnBCJBh5zlK6ebxbtJKvhxaTs U7iwZm4v+prGlpEIxn6J2/YuoyHdDcY0WRqntQNBL8FvUZ0AJvRTtTdFAzLnbqNZ8WZL bWfNNTg+2wSSqPmvtLSF/g74Bhkj2hGLuitI0t68WW/X5WW8nO69lN71BPnNdEtuFBL5 cn+QqLqGD0NZdtmLn7kDW+IpDBepC/7DPu2Bf72W33XBCJ2/L8rjdWzTYsFVxIxqpfGy cxjw== 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 ti14-20020a170907c20e00b0096f7d567661si157217ejc.414.2023.05.23.07.00.17; Tue, 23 May 2023 07:00:19 -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 A34BC68C159; Tue, 23 May 2023 16:59:11 +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 03A1068C090 for ; Tue, 23 May 2023 16:59:03 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 2D6D12405EC for ; Tue, 23 May 2023 15:58:59 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id P8VYN2-DAZSA for ; Tue, 23 May 2023 15:58:54 +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 7FFEE2405B5 for ; Tue, 23 May 2023 15:58:48 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 723A83A031B for ; Tue, 23 May 2023 15:58:48 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 23 May 2023 15:58:35 +0200 Message-Id: <20230523135842.20388-8-anton@khirnov.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523135842.20388-1-anton@khirnov.net> References: <20230523135842.20388-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 08/15] fftools/ffmpeg_demux: skip unused/attachment streams in final stats 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: W1b5nck+e9sn No useful information can be printed for them. --- fftools/ffmpeg_demux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index bd267aa0ce..33322ac565 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -781,6 +781,9 @@ static void demux_final_stats(Demuxer *d) DemuxStream *ds = ds_from_ist(ist); enum AVMediaType type = ist->par->codec_type; + if (ist->discard || type == AVMEDIA_TYPE_ATTACHMENT) + continue; + total_size += ds->data_size; total_packets += ds->nb_packets;