aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorJeff Downs <heydowns@somuchpressure.net>2011-06-29 12:38:46 -0400
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-09-07 08:48:38 +0200
commit7b6b9be8614aa53e79db565c9203b9afaa452d8d (patch)
treed5b2e8755ab6371f3fe26b9a1d04fc309dfa0ba3 /ffmpeg.c
parent374409eb1a640abde877bb55d2e8a1e65083699a (diff)
downloadffmpeg-7b6b9be8614aa53e79db565c9203b9afaa452d8d.tar.gz
Make all option parsing functions match the function pointer type through which they are called.
All option parsing functions now match the function pointer signature through which they are called (int f(const char *, const char *), thereby working reliably on all platforms. Prefix all option processing functions with opt_
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index ab628b2cbc..4c067d79ed 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2946,7 +2946,7 @@ static int opt_frame_pix_fmt(const char *opt, const char *arg)
return AVERROR(EINVAL);
}
} else {
- show_pix_fmts();
+ opt_pix_fmts(NULL, NULL);
ffmpeg_exit(0);
}
return 0;
@@ -4077,16 +4077,18 @@ static void parse_matrix_coeffs(uint16_t *dest, const char *str)
}
}
-static void opt_inter_matrix(const char *opt, const char *arg)
+static int opt_inter_matrix(const char *opt, const char *arg)
{
inter_matrix = av_mallocz(sizeof(uint16_t) * 64);
parse_matrix_coeffs(inter_matrix, arg);
+ return 0;
}
-static void opt_intra_matrix(const char *opt, const char *arg)
+static int opt_intra_matrix(const char *opt, const char *arg)
{
intra_matrix = av_mallocz(sizeof(uint16_t) * 64);
parse_matrix_coeffs(intra_matrix, arg);
+ return 0;
}
static void show_usage(void)
@@ -4096,7 +4098,7 @@ static void show_usage(void)
printf("\n");
}
-static void show_help(void)
+static int opt_help(const char *opt, const char *arg)
{
AVCodec *c;
AVOutputFormat *oformat = NULL;
@@ -4151,6 +4153,7 @@ static void show_help(void)
}
av_opt_show2(sws_opts, NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0);
+ return 0;
}
static int opt_target(const char *opt, const char *arg)
@@ -4381,11 +4384,13 @@ static void log_callback_null(void* ptr, int level, const char* fmt, va_list vl)
{
}
-static void opt_passlogfile(const char *opt, const char *arg)
+static int opt_passlogfile(const char *opt, const char *arg)
{
pass_logfilename_prefix = arg;
#if CONFIG_LIBX264_ENCODER
- opt_default("passlogfile", arg);
+ return opt_default("passlogfile", arg);
+#else
+ return 0;
#endif
}