aboutsummaryrefslogtreecommitdiffstats
path: root/src/blind-flop.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-04-09 23:46:17 +0200
committerMattias Andrée <maandree@kth.se>2017-04-09 23:46:17 +0200
commitdac6950d9e556d5521ad7913d27a6cf83e2a90a1 (patch)
treebb6a65d973337a0504117888d5534967cc51f479 /src/blind-flop.c
parentClean up (diff)
downloadblind-dac6950d9e556d5521ad7913d27a6cf83e2a90a1.tar.gz
blind-dac6950d9e556d5521ad7913d27a6cf83e2a90a1.tar.bz2
blind-dac6950d9e556d5521ad7913d27a6cf83e2a90a1.tar.xz
Clean up
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/blind-flop.c')
-rw-r--r--src/blind-flop.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/blind-flop.c b/src/blind-flop.c
index 39370a5..3401f7d 100644
--- a/src/blind-flop.c
+++ b/src/blind-flop.c
@@ -17,14 +17,11 @@ main(int argc, char *argv[])
UNOFLAGS(argc);
- stream.file = "<stdin>";
- stream.fd = STDIN_FILENO;
- einit_stream(&stream);
+ eopen_stream(&stream, NULL);
fprint_stream_head(stdout, &stream);
efflush(stdout, "<stdout>");
- if (stream.width > SIZE_MAX / stream.pixel_size)
- eprintf("<stdin>: video frame is too wide\n");
+ echeck_frame_size(stream.width, 1, stream.pixel_size, 0, stream.file);
n = stream.width * stream.pixel_size;
buf = emalloc(n);
image = emalloc(n);