Skip to content
Snippets Groups Projects
Commit 5c6c3acc authored by Martin Storsjö's avatar Martin Storsjö Committed by Ronald S. Bultje
Browse files

Fix muxers writing to stdout

parent 62069f12
No related branches found
No related tags found
1 merge request!26Fix muxers writing to stdout
Pipeline #313 passed with stage
in 21 seconds
......@@ -206,7 +206,7 @@ static void md5_close(MD5Context *const md5) {
md5->abcd[i] >> 24);
fprintf(md5->f, "\n");
if (md5->f != stdin)
if (md5->f != stdout)
fclose(md5->f);
}
......
......@@ -43,7 +43,7 @@ static int y4m2_open(Y4m2OutputContext *const c, const char *const file,
const Dav1dPictureParameters *p, const unsigned fps[2])
{
if (!strcmp(file, "-")) {
c->f = stdin;
c->f = stdout;
} else if (!(c->f = fopen(file, "w"))) {
fprintf(stderr, "Failed to open %s: %s\n", file, strerror(errno));
return -1;
......@@ -100,7 +100,7 @@ error:
}
static void y4m2_close(Y4m2OutputContext *const c) {
if (c->f != stdin)
if (c->f != stdout)
fclose(c->f);
}
......
......@@ -44,7 +44,7 @@ static int yuv_open(YuvOutputContext *const c, const char *const file,
const unsigned fps[2])
{
if (!strcmp(file, "-")) {
c->f = stdin;
c->f = stdout;
} else if (!(c->f = fopen(file, "w"))) {
fprintf(stderr, "Failed to open %s: %s\n", file, strerror(errno));
return -1;
......@@ -90,7 +90,7 @@ error:
}
static void yuv_close(YuvOutputContext *const c) {
if (c->f != stdin)
if (c->f != stdout)
fclose(c->f);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment