Extract chapter instead of subtitles if extract_chapters is True.

This commit is contained in:
Saurabh Shrivastava 2017-01-21 01:29:04 +05:30 committed by GitHub
parent 57daaf3e4d
commit 0e4d211eaf

View File

@ -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;