Use atexit() instead of defining a custom exit_program() interface.

This commit is contained in:
Diego Elio Pettenò
2012-09-05 07:03:56 +00:00
committed by Derek Buitenhuis
parent bd680c7b49
commit 5e3f9979fa
8 changed files with 115 additions and 130 deletions

View File

@ -400,15 +400,9 @@ int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t pts, int64_t dts);
FILE *get_preset_file(char *filename, size_t filename_size,
const char *preset_name, int is_path, const char *codec_name);
/**
* Do all the necessary cleanup and abort.
* This function is implemented in the avtools, not cmdutils.
*/
av_noreturn void exit_program(int ret);
/**
* Realloc array to hold new_size elements of elem_size.
* Calls exit_program() on failure.
* Calls exit() on failure.
*
* @param elem_size size in bytes of each element
* @param size new element count will be written here