mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
If output name is dash - write to stdout
This commit is contained in:
parent
c46b75a0ca
commit
992a98c5c4
|
@ -216,8 +216,15 @@ int main(int argc, char *argv[])
|
|||
goto exit_failure;
|
||||
}
|
||||
|
||||
// Open output file and check that it was opened correctly
|
||||
output = fopen(cfg->output, "wb");
|
||||
// Check if the output file name is a dash, this means stdout
|
||||
if (!strcmp(cfg->output, "-")) {
|
||||
output = stdout;
|
||||
} else {
|
||||
// Otherwise we try to open the output file
|
||||
output = fopen(cfg->output, "wb");
|
||||
}
|
||||
|
||||
// Check that output was opened correctly
|
||||
if (output == NULL) {
|
||||
fprintf(stderr, "Could not open output file, shutting down!\n");
|
||||
goto exit_failure;
|
||||
|
|
Loading…
Reference in a new issue