Remove exit_program() and register_exit(), as they are no longer used.
Unified · Split
| @@ -83,21 +83,6 @@ void init_dynload(void) · 82 unmodified lines | |||
| 83 | #endif | 83 | #endif |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | static void (*program_exit)(int ret); | ||
| 87 | |||
| 88 | void register_exit(void (*cb)(int ret)) | ||
| 89 | { | ||
| 90 | program_exit = cb; | ||
| 91 | } | ||
| 92 | |||
| 93 | void exit_program(int ret) | ||
| 94 | { | ||
| 95 | if (program_exit) | ||
| 96 | program_exit(ret); | ||
| 97 | |||
| 98 | exit(ret); | ||
| 99 | } | ||
| 100 | |||
| 101 | int parse_number(const char *context, const char *numstr, int type, | 86 | int parse_number(const char *context, const char *numstr, int type, |
| 102 | double min, double max, double *dst) | 87 | double min, double max, double *dst) |
| 103 | { | 88 | { |
| @@ -49,16 +49,6 @@ extern AVDictionary *swr_opts; · 48 unmodified lines | |||
| 49 | extern AVDictionary *format_opts, *codec_opts; | 49 | extern AVDictionary *format_opts, *codec_opts; |
| 50 | extern int hide_banner; | 50 | extern int hide_banner; |
| 51 | 51 | ||
| 52 | /** | ||
| 53 | * Register a program-specific cleanup routine. | ||
| 54 | */ | ||
| 55 | void register_exit(void (*cb)(int ret)); | ||
| 56 | |||
| 57 | /** | ||
| 58 | * Wraps exit with a program-specific cleanup routine. | ||
| 59 | */ | ||
| 60 | void exit_program(int ret) av_noreturn; | ||
| 61 | |||
| 62 | /** | 52 | /** |
| 63 | * Initialize dynamic library loading | 53 | * Initialize dynamic library loading |
| 64 | */ | 54 | */ |
| @@ -1324,8 +1324,6 @@ int main(int argc, char **argv) · 1323 unmodified lines | |||
| 1324 | 1324 | ||
| 1325 | init_dynload(); | 1325 | init_dynload(); |
| 1326 | 1326 | ||
| 1327 | register_exit(ffmpeg_cleanup); | ||
| 1328 | |||
| 1329 | setvbuf(stderr,NULL,_IONBF,0); /* win32 runtime needs this */ | 1327 | setvbuf(stderr,NULL,_IONBF,0); /* win32 runtime needs this */ |
| 1330 | 1328 | ||
| 1331 | av_log_set_flags(AV_LOG_SKIP_REPEATED); | 1329 | av_log_set_flags(AV_LOG_SKIP_REPEATED); |
| @@ -1376,6 +1374,6 @@ finish: · 44 unmodified lines | |||
| 1376 | if (ret == AVERROR_EXIT) | 1374 | if (ret == AVERROR_EXIT) |
| 1377 | ret = 0; | 1375 | ret = 0; |
| 1378 | 1376 | ||
| 1379 | exit_program(ret); | 1377 | ffmpeg_cleanup(ret); |
| 1380 | return ret; | 1378 | return ret; |
| 1381 | } | 1379 | } |