Browse Source

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@tencent.com>
tags/n4.2
Jun Zhao 6 years ago
parent
commit
7c1875143d
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      doc/examples/metadata.c

+ 5
- 0
doc/examples/metadata.c View File

@@ -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);



Loading…
Cancel
Save