aboutsummaryrefslogtreecommitdiffstats
path: root/src/vu-from-video.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-01-13 08:32:17 +0100
committerMattias Andrée <maandree@kth.se>2017-01-13 08:32:17 +0100
commit836ed8b478c660a2fcb18cb4036da5706afd155c (patch)
tree92a8512ffcd96126944f87bf5ed0113381d735bf /src/vu-from-video.c
parentvu-from-video: add -d (diff)
downloadblind-836ed8b478c660a2fcb18cb4036da5706afd155c.tar.gz
blind-836ed8b478c660a2fcb18cb4036da5706afd155c.tar.bz2
blind-836ed8b478c660a2fcb18cb4036da5706afd155c.tar.xz
vu-from-image: style fix + vu-from-video: fix loop
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/vu-from-video.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vu-from-video.c b/src/vu-from-video.c
index 9fa9942..92503bb 100644
--- a/src/vu-from-video.c
+++ b/src/vu-from-video.c
@@ -110,7 +110,7 @@ convert_segment(char *buf, size_t n, int fd, char *file)
double r, g, b;
pixel_t pixels[1024];
if (draft) {
- for (ptr = i = 0; ptr < n; ptr += 8, i++) {
+ for (ptr = i = 0; ptr < n; ptr += 8) {
pixels[i][3] = ntohs(((uint16_t *)(buf + ptr))[0]) / max;
y = ntohs(((uint16_t *)(buf + ptr))[1]);
u = ntohs(((uint16_t *)(buf + ptr))[2]);
@@ -122,7 +122,7 @@ convert_segment(char *buf, size_t n, int fd, char *file)
}
}
} else {
- for (ptr = i = 0; ptr < n; ptr += 8, i++) {
+ for (ptr = i = 0; ptr < n; ptr += 8) {
pixels[i][3] = ntohs(((uint16_t *)(buf + ptr))[0]) / max;
y = ntohs(((uint16_t *)(buf + ptr))[1]) / max;
u = ntohs(((uint16_t *)(buf + ptr))[2]) / max;