]> git.sesse.net Git - ffmpeg/blobdiff - ffprobe.c
lavfi: rename vsink_buffer.c to sink_buffer.c, and vsink_buffer.h to buffersink.h
[ffmpeg] / ffprobe.c
index 27482240de134b600e17fd9f89a63cb2c6defba7..9c4f2d182e810993b9ad2d284f4c23763b6e0005 100644 (file)
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -58,6 +58,11 @@ static const char *unit_hertz_str           = "Hz"   ;
 static const char *unit_byte_str            = "byte" ;
 static const char *unit_bit_per_second_str  = "bit/s";
 
+void exit_program(int ret)
+{
+    exit(ret);
+}
+
 static char *value_string(char *buf, int buf_size, double val, const char *unit)
 {
     if (unit == unit_second_str && use_value_sexagesimal_format) {
@@ -455,7 +460,7 @@ static int opt_format(const char *opt, const char *arg)
     return 0;
 }
 
-static int opt_input_file(const char *opt, 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",
@@ -465,16 +470,16 @@ static int opt_input_file(const char *opt, const char *arg)
     if (!strcmp(arg, "-"))
         arg = "pipe:";
     input_filename = arg;
-    return 0;
 }
 
 static int opt_help(const char *opt, const char *arg)
 {
+    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(avformat_opts, NULL,
+    av_opt_show2(&class, NULL,
                  AV_OPT_FLAG_DECODING_PARAM, 0);
     return 0;
 }
@@ -518,7 +523,7 @@ int main(int argc, char **argv)
 #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();
@@ -529,7 +534,5 @@ int main(int argc, char **argv)
 
     ret = probe_file(input_filename);
 
-    av_free(avformat_opts);
-
     return ret;
 }