fftools/ffmpeg: stop calling exit_program()

Remove exit_program() and register_exit(), as they are no longer used.
This commit is contained in:
Anton Khirnov 2023-07-14 18:36:05 +02:00
parent a81d9231b9
commit ccc6849932
3 changed files with 1 additions and 28 deletions

View File

@ -83,21 +83,6 @@ void init_dynload(void)
#endif
}
static void (*program_exit)(int ret);
void register_exit(void (*cb)(int ret))
{
program_exit = cb;
}
void exit_program(int ret)
{
if (program_exit)
program_exit(ret);
exit(ret);
}
int parse_number(const char *context, const char *numstr, int type,
double min, double max, double *dst)
{

View File

@ -49,16 +49,6 @@ extern AVDictionary *swr_opts;
extern AVDictionary *format_opts, *codec_opts;
extern int hide_banner;
/**
* Register a program-specific cleanup routine.
*/
void register_exit(void (*cb)(int ret));
/**
* Wraps exit with a program-specific cleanup routine.
*/
void exit_program(int ret) av_noreturn;
/**
* Initialize dynamic library loading
*/

View File

@ -1324,8 +1324,6 @@ int main(int argc, char **argv)
init_dynload();
register_exit(ffmpeg_cleanup);
setvbuf(stderr,NULL,_IONBF,0); /* win32 runtime needs this */
av_log_set_flags(AV_LOG_SKIP_REPEATED);
@ -1376,6 +1374,6 @@ finish:
if (ret == AVERROR_EXIT)
ret = 0;
exit_program(ret);
ffmpeg_cleanup(ret);
return ret;
}