diff mbox series

[FFmpeg-devel,18/25] fftools/ffmpeg: handle dumping input packets in input_thread()

Message ID 20220803135844.16662-18-anton@khirnov.net
State Accepted
Commit 9c16310fe509bd81b355207160ce5afc5f645855
Headers show
Series [FFmpeg-devel,01/25] fftools/ffmpeg_opt: move adding attachments out of open_output_file() | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov Aug. 3, 2022, 1:58 p.m. UTC
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 mbox series

Patch

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);