Commit 5e82ec9b authored by Clément Bœsch's avatar Clément Bœsch

doc/examples: properly close input in metadata.

Avoid some memleaks.
parent 50df68fd
...@@ -50,6 +50,6 @@ int main (int argc, char **argv) ...@@ -50,6 +50,6 @@ int main (int argc, char **argv)
while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
printf("%s=%s\n", tag->key, tag->value); printf("%s=%s\n", tag->key, tag->value);
avformat_free_context(fmt_ctx); avformat_close_input(&fmt_ctx);
return 0; return 0;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment