]> git.sesse.net Git - ffmpeg/blobdiff - avprobe.c
libgsm: Set options on the right object
[ffmpeg] / avprobe.c
index ae22dac6487c6d25abc2bf279af19ccf7cf8f662..de9657b7e37b020ed2b88a49e1498c9f9a4dc7b9 100644 (file)
--- a/avprobe.c
+++ b/avprobe.c
@@ -325,7 +325,7 @@ static int probe_file(const char *filename)
     if (do_show_format)
         show_format(fmt_ctx);
 
-    av_close_input_file(fmt_ctx);
+    avformat_close_input(&fmt_ctx);
     return 0;
 }
 
@@ -360,13 +360,11 @@ static void opt_input_file(void *optctx, const char *arg)
 
 static void show_help(void)
 {
-    const AVClass *class = avformat_get_class();
     av_log_set_callback(log_callback_help);
     show_usage();
     show_help_options(options, "Main options:\n", 0, 0);
     printf("\n");
-    av_opt_show2(&class, NULL,
-                 AV_OPT_FLAG_DECODING_PARAM, 0);
+    show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM);
 }
 
 static void opt_pretty(void)
@@ -401,6 +399,7 @@ int main(int argc, char **argv)
 
     parse_loglevel(argc, argv, options);
     av_register_all();
+    avformat_network_init();
     init_opts();
 #if CONFIG_AVDEVICE
     avdevice_register_all();
@@ -418,5 +417,7 @@ int main(int argc, char **argv)
 
     ret = probe_file(input_filename);
 
+    avformat_network_deinit();
+
     return ret;
 }