summaryrefslogtreecommitdiff
path: root/cmdutils.c
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2012-09-05 07:03:56 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2012-10-01 17:17:42 -0400
commit5e3f9979fae32fe837dab6cff5bde7de3c387611 (patch)
tree0c7f80cc8a57a4d93c316ed961f330ed3282f19f /cmdutils.c
parentbd680c7b49ba665467cb00664667928bbca516a9 (diff)
downloadffmpeg-5e3f9979fae32fe837dab6cff5bde7de3c387611.tar.gz
Use atexit() instead of defining a custom exit_program() interface.
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 0d216db469..9dbff9e846 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -97,7 +97,7 @@ double parse_number_or_die(const char *context, const char *numstr, int type,
else
return d;
av_log(NULL, AV_LOG_FATAL, error, context, numstr, min, max);
- exit_program(1);
+ exit(1);
return 0;
}
@@ -108,7 +108,7 @@ int64_t parse_time_or_die(const char *context, const char *timestr,
if (av_parse_time(&us, timestr, is_duration) < 0) {
av_log(NULL, AV_LOG_FATAL, "Invalid %s specification for %s: %s\n",
is_duration ? "duration" : "date", context, timestr);
- exit_program(1);
+ exit(1);
}
return us;
}
@@ -294,7 +294,7 @@ int parse_option(void *optctx, const char *opt, const char *arg,
}
}
if (po->flags & OPT_EXIT)
- exit_program(0);
+ exit(0);
return !!(po->flags & HAS_ARG);
}
@@ -320,7 +320,7 @@ void parse_options(void *optctx, int argc, char **argv, const OptionDef *options
opt++;
if ((ret = parse_option(optctx, opt, argv[optindex], options)) < 0)
- exit_program(1);
+ exit(1);
optindex += ret;
} else {
if (parse_arg_function)
@@ -429,7 +429,7 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg)
"Possible levels are numbers or:\n", arg);
for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++)
av_log(NULL, AV_LOG_FATAL, "\"%s\"\n", log_levels[i].name);
- exit_program(1);
+ exit(1);
}
av_log_set_level(level);
return 0;
@@ -1265,13 +1265,13 @@ void *grow_array(void *array, int elem_size, int *size, int new_size)
{
if (new_size >= INT_MAX / elem_size) {
av_log(NULL, AV_LOG_ERROR, "Array too big.\n");
- exit_program(1);
+ exit(1);
}
if (*size < new_size) {
uint8_t *tmp = av_realloc(array, new_size*elem_size);
if (!tmp) {
av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n");
- exit_program(1);
+ exit(1);
}
memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
*size = new_size;