wg <[email protected]> added the comment:

Please consider reverting r18137 and applying the appended patch to always print
info for all streams even if there are programs.

____________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/roundup/ffmpeg/issue835>
____________________________________________________
--- ffmpeg-wg/libavformat/utils.c.orig	2009-04-19 15:52:30.000000000 +0200
+++ ffmpeg-wg/libavformat/utils.c	2009-04-19 16:19:08.000000000 +0200
@@ -2874,6 +2874,7 @@
                  int is_output)
 {
     int i;
+    int done[MAX_STREAMS] = {0};
 
     av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n",
             is_output ? "Output" : "Input",
@@ -2912,18 +2913,24 @@
         av_log(NULL, AV_LOG_INFO, "\n");
     }
     if(ic->nb_programs) {
-        int j, k;
+        int j, k, total = 0;
         for(j=0; j<ic->nb_programs; j++) {
             AVMetadataTag *name = av_metadata_get(ic->programs[j]->metadata,
                                                   "name", NULL, 0);
             av_log(NULL, AV_LOG_INFO, "  Program %d %s\n", ic->programs[j]->id,
                    name ? name->value : "");
-            for(k=0; k<ic->programs[j]->nb_stream_indexes; k++)
+            for(k=0; k<ic->programs[j]->nb_stream_indexes; k++) {
                 dump_stream_format(ic, ic->programs[j]->stream_index[k], index, is_output);
-         }
-    } else
+                done[ic->programs[j]->stream_index[k]] = 1;
+            }
+            total += ic->programs[j]->nb_stream_indexes;
+        }
+        if (total < ic->nb_streams)
+            av_log(NULL, AV_LOG_INFO, "  Other\n");
+    }
     for(i=0;i<ic->nb_streams;i++)
-        dump_stream_format(ic, i, index, is_output);
+        if (!done[i])
+            dump_stream_format(ic, i, index, is_output);
 }
 
 #if LIBAVFORMAT_VERSION_MAJOR < 53

Reply via email to