diff --git a/src/ccextractor.c b/src/ccextractor.c index 4bcfadad..5c882570 100644 --- a/src/ccextractor.c +++ b/src/ccextractor.c @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) ret = parse_parameters (&ccx_options, argc, argv); if (ret == EXIT_NO_INPUT_FILES) { - usage (); + print_usage (); fatal (EXIT_NO_INPUT_FILES, "(This help screen was shown because there were no input files)\n"); } else if (ret == EXIT_WITH_HELP) diff --git a/src/lib_ccx/lib_ccx.h b/src/lib_ccx/lib_ccx.h index 7c2f162d..27fee77d 100644 --- a/src/lib_ccx/lib_ccx.h +++ b/src/lib_ccx/lib_ccx.h @@ -151,7 +151,7 @@ void dinit_libraries( struct lib_ccx_ctx **ctx); //params.c int parse_parameters (struct ccx_s_options *opt, int argc, char *argv[]); -void usage (void); +void print_usage (void); int detect_input_file_overwrite(struct lib_ccx_ctx *ctx, const char *output_filename); int atoi_hex (char *s); int stringztoms (const char *s, struct ccx_boundary_time *bt); diff --git a/src/lib_ccx/params.c b/src/lib_ccx/params.c index 68dce7f0..1ff4b27a 100644 --- a/src/lib_ccx/params.c +++ b/src/lib_ccx/params.c @@ -249,7 +249,7 @@ void set_input_format (struct ccx_s_options *opt, const char *format) { opt->demux_cfg.auto_stream = CCX_SM_TRANSPORT; opt->demux_cfg.m2ts = 0; - } + } else if (strcmp(format, "m2ts") == 0) { opt->demux_cfg.auto_stream = CCX_SM_TRANSPORT; @@ -275,7 +275,7 @@ void set_input_format (struct ccx_s_options *opt, const char *format) fatal (EXIT_MALFORMED_PARAMETER, "Unknown input file format: %s\n", format); } -void usage (void) +void print_usage (void) { mprint ("Originally based on McPoodle's tools. Check his page for lots of information\n"); mprint ("on closed captions technical details.\n"); @@ -555,7 +555,7 @@ void usage (void) mprint (" -nobi -nobufferinput: Disables input buffering.\n"); mprint (" -bs --buffersize val: Specify a size for reading, in bytes (suffix with K or\n"); mprint (" or M for kilobytes and megabytes). Default is 16M.\n"); - mprint (" -koc: keep-output-close. If used then CCExtractor will close\n"); + mprint (" -koc: keep-output-close. If used then CCExtractor will close\n"); mprint (" the output file after writing each subtitle frame and\n"); mprint (" attempt to create it again when needed.\n"); mprint (" -ff --forceflush: Flush the file buffer whenever content is written.\n"); @@ -983,7 +983,7 @@ int parse_parameters (struct ccx_s_options *opt, int argc, char *argv[]) { if (!strcmp (argv[i],"--help") || !strcmp(argv[i], "-h")) { - usage(); + print_usage(); return EXIT_WITH_HELP; } if (!strcmp(argv[i], "--version")) @@ -1016,7 +1016,7 @@ int parse_parameters (struct ccx_s_options *opt, int argc, char *argv[]) } continue; } - + #ifdef ENABLE_HARDSUBX // Parse -hardsubx and related parameters if (strcmp(argv[i], "-hardsubx")==0) @@ -1239,8 +1239,8 @@ int parse_parameters (struct ccx_s_options *opt, int argc, char *argv[]) } if (strcmp(argv[i], "-sem") == 0){ opt->enc_cfg.with_semaphore = 1; - continue; - } + continue; + } if (strcmp (argv[i],"-nots")==0 || strcmp (argv[i],"--notypesetting")==0) { @@ -1522,7 +1522,7 @@ int parse_parameters (struct ccx_s_options *opt, int argc, char *argv[]) opt->enc_cfg.splitbysentence = 1; continue; } - + if ((strcmp (argv[i],"--capfile")==0 || strcmp (argv[i],"-caf")==0) && igui_mode_reports, "You can't extract both fields to stdout at the same time in broadcast mode."); return EXIT_INCOMPATIBLE_PARAMETERS; - } + } if (opt->write_format == CCX_OF_SPUPNG && opt->cc_to_stdout) { print_error(opt->gui_mode_reports, "You cannot use -out=spupng with -stdout.");