[FFmpeg-cvslog] doc/examples/metadata: fix the example can't dump FLV metadata

Jun Zhao git at videolan.org
Sun Apr 7 05:27:32 EEST 2019


ffmpeg | branch: master | Jun Zhao <barryjzhao at tencent.com> | Wed Apr  3 09:13:52 2019 +0800| [7c1875143db4573bad2d39f13aadbef7b13628ad] | committer: Jun Zhao

doc/examples/metadata: fix the example can't dump FLV metadata

fix the example can't dump FLV metadata.

Signed-off-by: Jun Zhao <barryjzhao at tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c1875143db4573bad2d39f13aadbef7b13628ad
---

 doc/examples/metadata.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/doc/examples/metadata.c b/doc/examples/metadata.c
index e330d077a9..b6cfa6bd36 100644
--- a/doc/examples/metadata.c
+++ b/doc/examples/metadata.c
@@ -47,6 +47,11 @@ int main (int argc, char **argv)
     if ((ret = avformat_open_input(&fmt_ctx, argv[1], NULL, NULL)))
         return ret;
 
+    if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0) {
+        av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
+        return ret;
+    }
+
     while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
         printf("%s=%s\n", tag->key, tag->value);
 



More information about the ffmpeg-cvslog mailing list