summaryrefslogtreecommitdiff
path: root/doc/examples/metadata.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/metadata.c')
-rw-r--r--doc/examples/metadata.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/examples/metadata.c b/doc/examples/metadata.c
index f4c6eee9c3..e330d077a9 100644
--- a/doc/examples/metadata.c
+++ b/doc/examples/metadata.c
@@ -22,8 +22,8 @@
/**
* @file
- * @example metadata.c
* Shows how the metadata API can be used in application programs.
+ * @example metadata.c
*/
#include <stdio.h>
@@ -44,13 +44,12 @@ int main (int argc, char **argv)
return 1;
}
- av_register_all();
if ((ret = avformat_open_input(&fmt_ctx, argv[1], NULL, NULL)))
return ret;
while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
printf("%s=%s\n", tag->key, tag->value);
- avformat_free_context(fmt_ctx);
+ avformat_close_input(&fmt_ctx);
return 0;
}