mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
Merge pull request #91 from saigono/master
If output name is dash – write to stdout
This commit is contained in:
commit
a4efbbe680
|
@ -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