summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/audiogen.c2
-rw-r--r--tests/videogen.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/audiogen.c b/tests/audiogen.c
index 4913a6ced8..b026a713a6 100644
--- a/tests/audiogen.c
+++ b/tests/audiogen.c
@@ -94,7 +94,7 @@ int main(int argc, char **argv)
exit(1);
}
- outfile = fopen(argv[1], "w");
+ outfile = fopen(argv[1], "wb");
if (!outfile) {
perror(argv[1]);
return 1;
diff --git a/tests/videogen.c b/tests/videogen.c
index 5f4ae3c0fa..0a7924301b 100644
--- a/tests/videogen.c
+++ b/tests/videogen.c
@@ -92,7 +92,7 @@ void pgmyuv_save(const char *filename, int w, int h,
rgb24_to_yuv420p(lum_tab, cb_tab, cr_tab, rgb_tab, w, h);
- f = fopen(filename,"w");
+ f = fopen(filename,"wb");
fprintf(f, "P5\n%d %d\n%d\n", w, (h * 3) / 2, 255);
fwrite(lum_tab, 1, w * h, f);
h2 = h / 2;