summaryrefslogtreecommitdiffstats
path: root/src/v4l2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4l2.c')
-rw-r--r--src/v4l2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/v4l2.c b/src/v4l2.c
index 64635fa..0e6f239 100644
--- a/src/v4l2.c
+++ b/src/v4l2.c
@@ -126,7 +126,7 @@ int v4l2_get_format(int video_fd, unsigned int type, unsigned int *width,
}
int v4l2_create_buffers(int video_fd, unsigned int type,
- unsigned int buffers_count)
+ unsigned int buffers_count, unsigned int *index_base)
{
struct v4l2_create_buffers buffers;
int rc;
@@ -150,6 +150,9 @@ int v4l2_create_buffers(int video_fd, unsigned int type,
return -1;
}
+ if (index_base != NULL)
+ *index_base = buffers.index;
+
return 0;
}