History

fftools/ffmpeg: stop calling exit_program()

Remove exit_program() and register_exit(), as they are no longer used.

Anton Khirnov committed 3 years ago

Commit ccc68491 parent a81d9233 files · +1 −28Browse files

Unified · Split

3 files
  1. fftools/cmdutils.c +0 −15
  2. fftools/cmdutils.h +0 −10
  3. fftools/ffmpeg.c +1 −3
fftools/cmdutils.c+0−15
@@ -83,21 +83,6 @@ void init_dynload(void) · 82 unmodified lines
83#endif83#endif
84}84}
85 85
86static void (*program_exit)(int ret);
87
88void register_exit(void (*cb)(int ret))
89{
90 program_exit = cb;
91}
92
93void exit_program(int ret)
94{
95 if (program_exit)
96 program_exit(ret);
97
98 exit(ret);
99}
100
101int parse_number(const char *context, const char *numstr, int type,86int 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{
fftools/cmdutils.h+0−10
@@ -49,16 +49,6 @@ extern AVDictionary *swr_opts; · 48 unmodified lines
49extern AVDictionary *format_opts, *codec_opts;49extern AVDictionary *format_opts, *codec_opts;
50extern int hide_banner;50extern int hide_banner;
51 51
52/**
53 * Register a program-specific cleanup routine.
54 */
55void register_exit(void (*cb)(int ret));
56
57/**
58 * Wraps exit with a program-specific cleanup routine.
59 */
60void exit_program(int ret) av_noreturn;
61
62/**52/**
63 * Initialize dynamic library loading53 * Initialize dynamic library loading
64 */54 */
fftools/ffmpeg.c+1−3
@@ -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}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t