[PATCH 1/1] yavta: Set plane size for mplane buffers in qbuf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The plane size was left zero for mplane buffers when queueing a buffer. Fix
this.

Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
---
 yavta.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/yavta.c b/yavta.c
index 7f9e814..77e5a41 100644
--- a/yavta.c
+++ b/yavta.c
@@ -979,8 +979,12 @@ static int video_queue_buffer(struct device *dev, int index, enum buffer_fill_mo
 
 	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];
 		}
-- 
2.1.0.231.g7484e3b

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux