From 24640642260c384263bcea971115f49bf0d0538b Mon Sep 17 00:00:00 2001 From: Saurabh Shrivastava Date: Thu, 12 Jan 2017 01:54:31 +0530 Subject: [PATCH] Stop GPAC from analyzing if input source is stdin. --- src/ccextractor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ccextractor.c b/src/ccextractor.c index eb402b21..e9144b06 100644 --- a/src/ccextractor.c +++ b/src/ccextractor.c @@ -239,6 +239,10 @@ int main(int argc, char *argv[]) case CCX_SM_MP4: mprint ("\rAnalyzing data with GPAC (MP4 library)\n"); close_input_file(ctx); // No need to have it open. GPAC will do it for us + if (ctx->current_file == -1) // We don't have a file to open, must be stdin, and GPAC is incompatible with stdin + { + 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.print_file_reports) print_file_report(ctx);