summaryrefslogtreecommitdiff
path: root/yavta.c
diff options
context:
space:
mode:
Diffstat (limited to 'yavta.c')
-rw-r--r--yavta.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/yavta.c b/yavta.c
index 7f9e814..d0bd932 100644
--- a/yavta.c
+++ b/yavta.c
@@ -973,16 +973,19 @@ static int video_queue_buffer(struct device *dev, int index, enum buffer_fill_mo
if (video_is_mplane(dev)) {
buf.m.planes = planes;
buf.length = dev->num_planes;
- } else {
- buf.length = dev->buffers[index].size[0];
}
if (dev->memtype == V4L2_MEMORY_USERPTR) {
if (video_is_mplane(dev)) {
- for (i = 0; i < dev->num_planes; i++)
- buf.m.planes[i].m.userptr = (unsigned long)dev->buffers[index].mem[i];
+ for (i = 0; i < dev->num_planes; i++) {
+ buf.m.planes[i].m.userptr = (unsigned long)
+ dev->buffers[index].mem[i];
+ buf.m.planes[i].length =
+ dev->buffers[index].size[i];
+ }
} else {
buf.m.userptr = (unsigned long)dev->buffers[index].mem[0];
+ buf.length = dev->buffers[index].size[0];
}
}