summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-11-15 11:53:21 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-02-10 23:29:54 +0100
commitcbd64859e6c1509b0f2ee7728cb66b120d52c45e (patch)
tree6390158ac0da1fe186cedf0be194684f46354563
parent1da680da46358e7469f19278698790becc1ff585 (diff)
videoout: Return a negative error code in vo_queue_buffer()
Most functions return 0 on success and a negative error code otherwise, make vo_queue_buffer() conform with that. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--videoout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/videoout.c b/videoout.c
index 51279e3..51bed8b 100644
--- a/videoout.c
+++ b/videoout.c
@@ -228,13 +228,13 @@ int vo_queue_buffer(struct videoout *vo, struct v4l2_video_buffer *buffer)
if (vo->queued[buffer->index]) {
fprintf(stderr, "buffer already queued\n");
- return 0;
+ return -EBUSY;
}
ret = v4l2_queue_buffer(vo->dev, buffer);
if (ret < 0) {
perror("VIDIOC_QBUF\n");
- return 0;
+ return ret;
}
vo->queued[buffer->index] = 1;
@@ -250,5 +250,5 @@ int vo_queue_buffer(struct videoout *vo, struct v4l2_video_buffer *buffer)
vo->ops->watch_fd(vo->dev->fd);
vo->num_queued++;
- return 1;
+ return 0;
}