summaryrefslogtreecommitdiff
path: root/avprobe.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 /avprobe.c
parentbd680c7b49ba665467cb00664667928bbca516a9 (diff)
Use atexit() instead of defining a custom exit_program() interface.
Diffstat (limited to 'avprobe.c')
-rw-r--r--avprobe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/avprobe.c b/avprobe.c
index b20c78cd34..8bc2a21459 100644
--- a/avprobe.c
+++ b/avprobe.c
@@ -59,10 +59,9 @@ 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)
+static void exit_program()
{
av_dict_free(&fmt_entries_to_show);
- exit(ret);
}
/*
@@ -926,6 +925,8 @@ int main(int argc, char **argv)
if (!buffer)
exit(1);
+ atexit(exit_program);
+
options = real_options;
parse_loglevel(argc, argv, options);
av_register_all();