diff options
| author | Mattias Andrée <maandree@kth.se> | 2017-05-07 16:48:25 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2017-05-07 17:10:45 +0200 |
| commit | 878849c465604d90d236b3c8766bf75a4b6836d2 (patch) | |
| tree | 315982d2c98ff7ae4de597697575837b41f24206 /src/blind-next-frame.c | |
| parent | Add support for floats (diff) | |
| download | blind-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.c | 5 |
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>"); |
