aboutsummaryrefslogtreecommitdiffstats
path: root/src/blind-next-frame.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-05-07 16:48:25 +0200
committerMattias Andrée <maandree@kth.se>2017-05-07 17:10:45 +0200
commit878849c465604d90d236b3c8766bf75a4b6836d2 (patch)
tree315982d2c98ff7ae4de597697575837b41f24206 /src/blind-next-frame.c
parentAdd support for floats (diff)
downloadblind-878849c465604d90d236b3c8766bf75a4b6836d2.tar.gz
blind-878849c465604d90d236b3c8766bf75a4b6836d2.tar.bz2
blind-878849c465604d90d236b3c8766bf75a4b6836d2.tar.xz
Add blind-convert
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/blind-next-frame.c')
-rw-r--r--src/blind-next-frame.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/blind-next-frame.c b/src/blind-next-frame.c
index 14d2326..bd47f1d 100644
--- a/src/blind-next-frame.c
+++ b/src/blind-next-frame.c
@@ -56,9 +56,8 @@ main(int argc, char *argv[])
w = stream.width * stream.pixel_size;
for (; stream.frames; stream.frames--) {
for (h = stream.height; h; h--) {
- for (n = w; n; n -= stream.ptr) {
- stream.ptr = 0;
- if (!enread_stream(2, &stream, n))
+ for (n = w; n; n -= stream.ptr, stream.ptr = 0) {
+ if (!stream.ptr && !enread_stream(2, &stream, n))
goto done;
anything = 1;
enwriteall(2, STDOUT_FILENO, stream.buf, stream.ptr, "<stdout>");