diff --git a/ffmpeg.c b/ffmpeg.c
index 15ab6b38e41fea40e1ca61f545ef24a6b8207a19..a042b9870a0ec5c67311ddc45c63c586c1f365b5 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2594,7 +2594,8 @@ static int transcode(AVFormatContext **output_files,
         memset(no_packet, 0, sizeof(no_packet));
 
         if (do_pkt_dump) {
-            av_pkt_dump_log(NULL, AV_LOG_DEBUG, &pkt, do_hex_dump);
+            av_pkt_dump_log2(NULL, AV_LOG_DEBUG, &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 */