From patchwork Wed Aug 3 13:58: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: 37115 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp459502pzb; Wed, 3 Aug 2022 07:02:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR7DysFTtsUvtgMdAbF1zjQfJUgfpQaM/MmckQMSaap5L0Tkn8R6/pLmq5Yiy0s3pBU9OUg9 X-Received: by 2002:a17:907:1dd7:b0:730:8dfd:9e13 with SMTP id og23-20020a1709071dd700b007308dfd9e13mr10090969ejc.239.1659535327317; Wed, 03 Aug 2022 07:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659535327; cv=none; d=google.com; s=arc-20160816; b=CycSkw2CsMKVdE/hFxOxHGbv7mx9w7WbEjGsWwtyQrHwL1y5EZC4iJkZl8KNDlzzqq HsoD9j/vme+sNIphAZuhSCs/X9adVxnYE9wg+k2Bl2zLXUrnsbO8IXIWViUtH+o/dcDB VSI7FVEQRg9GLnZeuYgt2KbYdf05iP4uv/7UDCq0ckkPftjRNmyG1d6SUhzQnxQbDczN 8boeBHN5qOYPoxNQS3t5hkALAsdVBdqQvMIrsvmQx5CVJ9ZpQ+i/1Alg3Pdf1BFkG7JQ jdLnO7YrCQUMls0iVM4yFsC0/tvg0A7XqiI2I56HNdZN4dJuVb1yEVbIuPCDUKpNg9g2 MA5w== 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=iYlxMg4b/YzUnUjLcjgYExYTESJWG6AixNI+5I2KQiE=; b=f53k6ql6fD1dIVHahq/KkodeITfaIvoRhCcrElpj9jsoSCvtFVW+7M6eYiP5MHXXg6 wj0+DlQggweRbbh27V6uHXMAjKoSYM89Lf/U4O1WBAaaDt00cGonty6RcdDoH/vt4wdi tCfJdnT6rae3CE3D6Igu5K2IH+2SfqOjS3LwRZumczzymgjBLa4gij147dX6OQA+CMEK Z7uo83KTi3JQM+uqpI3OpLWYFi3Mv9nCHDkt3tkmTFXz9rPnzysJZC1KZ5GClLHvdHPC i0SYHCo2KJx6S5kBVbL8D5I6ut8HzFAQhIs/mlbNr82XFR7ujo5L7/x8bDTu3YZ4DaU1 W1jA== 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 ds13-20020a170907724d00b007304f2e50c2si16066681ejc.52.2022.08.03.07.02.06; Wed, 03 Aug 2022 07:02:07 -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 4BE2868B9B0; Wed, 3 Aug 2022 16:59: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 D704A68B895 for ; Wed, 3 Aug 2022 16:59:01 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 250072404FE for ; Wed, 3 Aug 2022 15:59:00 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id OLkvKZ1-AB2x for ; Wed, 3 Aug 2022 15:58:59 +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 EDBDF24055A for ; Wed, 3 Aug 2022 15:58:54 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 35E713A0592; Wed, 3 Aug 2022 15:58:52 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Aug 2022 15:58:37 +0200 Message-Id: <20220803135844.16662-18-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220803135844.16662-1-anton@khirnov.net> References: <20220803135844.16662-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 18/25] fftools/ffmpeg: handle dumping input packets in input_thread() 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: 6lSMc2c7k9/9 This is a more appropriate place for this. --- fftools/ffmpeg.c | 4 ---- fftools/ffmpeg_demux.c | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 3911db1948..1393ca9c1e 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3831,10 +3831,6 @@ static int process_input(int file_index) reset_eagain(); - if (do_pkt_dump) { - av_pkt_dump_log2(NULL, AV_LOG_INFO, pkt, do_hex_dump, - is->streams[pkt->stream_index]); - } /* the following test is needed in case new streams appear dynamically in stream : we ignore them */ if (pkt->stream_index >= ifile->nb_streams) { diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 2629af5950..f9bd6d47fe 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -45,6 +45,12 @@ static void *input_thread(void *arg) av_thread_message_queue_set_err_recv(f->in_thread_queue, ret); break; } + + if (do_pkt_dump) { + av_pkt_dump_log2(NULL, AV_LOG_INFO, pkt, do_hex_dump, + f->ctx->streams[pkt->stream_index]); + } + queue_pkt = av_packet_alloc(); if (!queue_pkt) { av_packet_unref(pkt);