Printing end message after fatal.

This commit is contained in:
Saurabh Shrivastava 2017-02-06 02:01:05 +05:30
parent dbad5f4cda
commit 6837a1070b
3 changed files with 14 additions and 3 deletions

View File

@ -49,6 +49,14 @@ void sigint_handler(int sig)
exit(EXIT_SUCCESS);
}
void print_end_msg()
{
mprint("Issues? Open a ticket here\n");
mprint("https://github.com/CCExtractor/ccextractor/issues\n");
}
struct ccx_s_options ccx_options;
int main(int argc, char *argv[])
{
@ -434,14 +442,13 @@ int main(int argc, char *argv[])
if (!ret)
mprint("\nNo captions were found in input.\n");
mprint("Issues? Open a ticket here\n");
mprint("https://github.com/CCExtractor/ccextractor/issues\n");
print_end_msg();
if (show_myth_banner)
{
mprint("NOTICE: Due to the major rework in 0.49, we needed to change part of the timing\n");
mprint("code in the MythTV's branch. Please report results to the address above. If\n");
mprint("something is broken it will be fixed. Thanks\n");
}
return ret ? EXIT_OK : EXIT_NO_CAPTIONS;
}

View File

@ -151,6 +151,9 @@ struct lib_ccx_ctx
struct lib_ccx_ctx* init_libraries(struct ccx_s_options *opt);
void dinit_libraries( struct lib_ccx_ctx **ctx);
//ccextractor.c
void print_end_msg();
//params.c
int parse_parameters (struct ccx_s_options *opt, int argc, char *argv[]);
void print_usage (void);

View File

@ -265,6 +265,7 @@ void fatal(int exit_code, const char *fmt, ...)
fprintf(stderr, "\rError: ");
vfprintf(stderr, fmt, args);
fprintf(stderr, "\n");
print_end_msg();
va_end(args);
exit(exit_code);
}