if (do_show_format)
show_format(fmt_ctx);
- av_close_input_file(fmt_ctx);
+ avformat_close_input(&fmt_ctx);
return 0;
}
return 0;
}
-static void opt_input_file(const char *arg)
+static void opt_input_file(void *optctx, const char *arg)
{
if (input_filename) {
fprintf(stderr, "Argument '%s' provided as input filename, but '%s' was already specified.\n",
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)
{
int ret;
+ parse_loglevel(argc, argv, options);
av_register_all();
+ avformat_network_init();
init_opts();
#if CONFIG_AVDEVICE
avdevice_register_all();
#endif
show_banner();
- parse_options(argc, argv, options, opt_input_file);
+ parse_options(NULL, argc, argv, options, opt_input_file);
if (!input_filename) {
show_usage();
ret = probe_file(input_filename);
+ avformat_network_deinit();
+
return ret;
}