Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/ffmpeg.c b/ffmpeg.c
- index 6c3994f..f732d52 100644
- --- a/ffmpeg.c
- +++ b/ffmpeg.c
- @@ -3259,12 +3259,18 @@ static void log_callback_null(void *ptr, int level, const char *fmt, va_list vl)
- {
- }
- +static void do_exit(int status)
- +{
- + exit_program();
- + exit(status);
- +}
- +
- int main(int argc, char **argv)
- {
- int ret;
- int64_t ti;
- - atexit(exit_program);
- + //atexit(exit_program);
- setvbuf(stderr,NULL,_IONBF,0); /* win32 runtime needs this */
- @@ -3293,34 +3299,34 @@ int main(int argc, char **argv)
- /* parse options and open all input/output files */
- ret = ffmpeg_parse_options(argc, argv);
- if (ret < 0)
- - exit(1);
- + do_exit(1);
- if (nb_output_files <= 0 && nb_input_files == 0) {
- show_usage();
- av_log(NULL, AV_LOG_WARNING, "Use -h to get full help or, even better, run 'man %s'\n", program_name);
- - exit(1);
- + do_exit(1);
- }
- /* file converter / grab */
- if (nb_output_files <= 0) {
- av_log(NULL, AV_LOG_FATAL, "At least one output file must be specified\n");
- - exit(1);
- + do_exit(1);
- }
- // if (nb_input_files == 0) {
- // av_log(NULL, AV_LOG_FATAL, "At least one input file must be specified\n");
- -// exit(1);
- +// do_exit(1);
- // }
- current_time = ti = getutime();
- if (transcode() < 0)
- - exit(1);
- + do_exit(1);
- ti = getutime() - ti;
- if (do_benchmark) {
- int maxrss = getmaxrss() / 1024;
- printf("bench: utime=%0.3fs maxrss=%ikB\n", ti / 1000000.0, maxrss);
- }
- - exit(received_nb_signals ? 255 : 0);
- + do_exit(received_nb_signals ? 255 : 0);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement