V4L/DVB (5548): Fix v4l2 buffer to the length
authorLuc Saillard <luc@saillard.org>
Mon, 23 Apr 2007 02:55:10 +0000 (23:55 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 27 Apr 2007 18:45:51 +0000 (15:45 -0300)
Set the length of the v4l2 buffer to the length of the mapped memory.

This should fix the problem with amsn.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/pwc/pwc-v4l.c

index e20251d..32fbe1a 100644 (file)
@@ -1168,7 +1168,7 @@ int pwc_video_do_ioctl(struct inode *inode, struct file *file,
                        buf->sequence = 0;
                        buf->memory = V4L2_MEMORY_MMAP;
                        buf->m.offset = pdev->fill_image * pdev->len_per_image;
-                       buf->length = buf->bytesused;
+                       buf->length = pdev->len_per_image;
                        pwc_next_image(pdev);
 
                        PWC_DEBUG_IOCTL("VIDIOC_DQBUF: buf->index=%d\n",buf->index);