diff mbox series

[FFmpeg-devel,08/15] fftools/ffmpeg_demux: skip unused/attachment streams in final stats

Message ID 20230523135842.20388-8-anton@khirnov.net
State Accepted
Commit 335688a3d3835c3b6e1364231b75e6817d7941a0
Headers show
Series [FFmpeg-devel,01/15] fftools/ffmpeg_hw: move hw_device_setup_for_decode() to ffmpeg_dec | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov May 23, 2023, 1:58 p.m. UTC
No useful information can be printed for them.
---
 fftools/ffmpeg_demux.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

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;