From 0e4d211eaf9765cf37c81a7e4e87596857cd0f3b Mon Sep 17 00:00:00 2001 From: Saurabh Shrivastava Date: Sat, 21 Jan 2017 01:29:04 +0530 Subject: [PATCH] Extract chapter instead of subtitles if extract_chapters is True. --- src/ccextractor.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ccextractor.c b/src/ccextractor.c index f15f4a5a..6a580dfc 100644 --- a/src/ccextractor.c +++ b/src/ccextractor.c @@ -243,7 +243,14 @@ int main(int argc, char *argv[]) { fatal (EXIT_INCOMPATIBLE_PARAMETERS, "MP4 requires an actual file, it's not possible to read from a stream, including stdin.\n"); } - tmp = processmp4(ctx, &ctx->mp4_cfg, ctx->inputfile[ctx->current_file]); + if(ccx_options.extract_chapters) + { + tmp = dumpchapters(ctx, &ctx->mp4_cfg, ctx->inputfile[ctx->current_file]); + } + else + { + tmp = processmp4(ctx, &ctx->mp4_cfg, ctx->inputfile[ctx->current_file]); + } if (ccx_options.print_file_reports) print_file_report(ctx); if (!ret) ret = tmp;