diff options
| author | Mattias Andrée <maandree@kth.se> | 2017-08-06 02:52:29 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2017-08-06 02:52:29 +0200 |
| commit | b640dfad6fd5c0ae3a9bfdd9b4bd54e387b0cc51 (patch) | |
| tree | 8d1614209eeb045d071349cc2808958647509110 /src/blind-single-colour.c | |
| parent | Update todo (diff) | |
| download | blind-b640dfad6fd5c0ae3a9bfdd9b4bd54e387b0cc51.tar.gz blind-b640dfad6fd5c0ae3a9bfdd9b4bd54e387b0cc51.tar.bz2 blind-b640dfad6fd5c0ae3a9bfdd9b4bd54e387b0cc51.tar.xz | |
Update blind-convert to support unconverted output from ffmpeg and partially converted output
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/blind-single-colour.c')
| -rw-r--r-- | src/blind-single-colour.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/blind-single-colour.c b/src/blind-single-colour.c index 567a7f5..92a8289 100644 --- a/src/blind-single-colour.c +++ b/src/blind-single-colour.c @@ -77,8 +77,7 @@ PROCESS(void) { typedef TYPE pixel_t[4]; pixel_t buf[BUFSIZ / 4]; - size_t x, y, n; - ssize_t r; + size_t x, y, n, r; for (x = 0; x < ELEMENTSOF(buf); x++) { buf[x][0] = (TYPE)X; buf[x][1] = (TYPE)Y; @@ -88,7 +87,7 @@ PROCESS(void) while (inf || stream.frames--) for (y = stream.height; y--;) for (x = stream.width * sizeof(*buf); x;) - for (x -= n = MIN(sizeof(buf), x); n; n -= (size_t)r) + for (x -= n = MIN(sizeof(buf), x); n; n -= r) r = ewrite(STDOUT_FILENO, buf, n, "<stdout>"); } |
