summaryrefslogtreecommitdiff
path: root/yavta.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-06-18 02:20:29 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-06-18 02:22:04 +0300
commit449a146784d554ef40e5dea3483cb5e9bacbb2c8 (patch)
tree2eb478501ba0489931a0c53e780653d57c24453a /yavta.c
parent72dfdee26cd792ffa09022b37d465b4a0bc90360 (diff)
Fix handling of last buffers before end of capture
yavta is supposed not to requeue the last buffers before end of capture (unless requested to do so with the --requeue-last option). However, the logic is wrong, and only one of the last buffers is not requeued. Fix it by skipping all of the last buffers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'yavta.c')
-rw-r--r--yavta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/yavta.c b/yavta.c
index 06247e6..95821a5 100644
--- a/yavta.c
+++ b/yavta.c
@@ -1698,7 +1698,7 @@ static int video_do_capture(struct device *dev, unsigned int nframes,
fflush(stdout);
- if (i == nframes - dev->nbufs && !do_requeue_last)
+ if (i >= nframes - dev->nbufs && !do_requeue_last)
continue;
ret = video_queue_buffer(dev, buf.index, fill);