[FFmpeg-cvslog] r19632 - in trunk: ffplay.c libavformat/utils.c

pross subversion
Wed Aug 12 15:17:39 CEST 2009


Author: pross
Date: Wed Aug 12 15:17:39 2009
New Revision: 19632

Log:
Moves the display of metadata to dump_format()

Modified:
   trunk/ffplay.c
   trunk/libavformat/utils.c

Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	Tue Aug 11 19:28:56 2009	(r19631)
+++ trunk/ffplay.c	Wed Aug 12 15:17:39 2009	(r19632)
@@ -1860,13 +1860,6 @@ static void stream_component_close(Video
     }
 }
 
-static void dump_stream_info(const AVFormatContext *s)
-{
-    AVMetadataTag *tag = NULL;
-    while ((tag=av_metadata_get(s->metadata,"",tag,AV_METADATA_IGNORE_SUFFIX)))
-        fprintf(stderr, "%s: %s\n", tag->key, tag->value);
-}
-
 /* since we have only one decoding thread, we can use a global
    variable instead of a thread local variable */
 static VideoState *global_video_state;
@@ -1960,7 +1953,6 @@ static int decode_thread(void *arg)
     }
     if (show_status) {
         dump_format(ic, 0, is->filename, 0);
-        dump_stream_info(ic);
     }
 
     /* open the streams */

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	Tue Aug 11 19:28:56 2009	(r19631)
+++ trunk/libavformat/utils.c	Wed Aug 12 15:17:39 2009	(r19632)
@@ -2916,6 +2916,14 @@ void dump_format(AVFormatContext *ic,
     } else
     for(i=0;i<ic->nb_streams;i++)
         dump_stream_format(ic, i, index, is_output);
+    if (ic->metadata) {
+        AVMetadataTag *tag=NULL;
+        av_log(NULL, AV_LOG_INFO, "  Metadata\n");
+        while((tag=av_metadata_get(ic->metadata, "", tag, AV_METADATA_IGNORE_SUFFIX))) {
+            av_log(NULL, AV_LOG_INFO, "    %-16s: %s\n", tag->key, tag->value);
+        }
+    }
+
 }
 
 #if LIBAVFORMAT_VERSION_MAJOR < 53



More information about the ffmpeg-cvslog mailing list