OSDN Git Service

ffprobe: discard non-selected streams
authorClément Bœsch <cboesch@gopro.com>
Tue, 9 May 2017 08:57:12 +0000 (10:57 +0200)
committerClément Bœsch <cboesch@gopro.com>
Thu, 11 May 2017 09:21:26 +0000 (11:21 +0200)
ffprobe.c

index 8129bce..f2a3cc7 100644 (file)
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -2886,6 +2886,8 @@ static int probe_file(WriterContext *wctx, const char *filename)
         } else {
             selected_streams[i] = 1;
         }
+        if (!selected_streams[i])
+            ifile.fmt_ctx->streams[i]->discard = AVDISCARD_ALL;
     }
 
     if (do_read_frames || do_read_packets) {