aboutsummaryrefslogtreecommitdiffstats
path: root/cmdutils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-25 18:44:36 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-25 18:55:43 +0100
commitc48f67f06ec3b887626b5938987d2a46bd52cf77 (patch)
treeb2669953b0daa2b02ee52586ef4d69b0e90b8d03 /cmdutils.c
parent5a8e994287d8ef181c0a5eac537547d7059b4524 (diff)
downloadffmpeg-c48f67f06ec3b887626b5938987d2a46bd52cf77.tar.gz
ff*: add -max_alloc command line option
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c
index e072d75970..adf1b5fea3 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -510,6 +510,20 @@ int opt_report(const char *opt)
return 0;
}
+int opt_max_alloc(const char *opt, const char *arg)
+{
+ char *tail;
+ size_t max;
+
+ max = strtol(arg, &tail, 10);
+ if (*tail) {
+ av_log(NULL, AV_LOG_FATAL, "Invalid max_alloc \"%s\".\n", arg);
+ exit_program(1);
+ }
+ av_max_alloc(max);
+ return 0;
+}
+
int opt_codec_debug(const char *opt, const char *arg)
{
av_log_set_level(AV_LOG_DEBUG);