[media] V4L: videobuf2: update buffer state on VIDIOC_QBUF
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Wed, 28 Sep 2011 10:23:27 +0000 (07:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 3 Nov 2011 20:28:26 +0000 (18:28 -0200)
V4L2 specification states, that the videobuffer state flags have to be
updated on VIDIOC_QBUF ioctl(). Videobuf2 currently doesn't do that,
which is fixed by this patch.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/videobuf2-core.c

index b88b5b08792b04cb96665dff902ff5490e81d8b1..82b51be3ca720eb012a0ccaaf6f8984deca74b3e 100644 (file)
@@ -935,6 +935,9 @@ int vb2_qbuf(struct vb2_queue *q, struct v4l2_buffer *b)
        if (q->streaming)
                __enqueue_in_driver(vb);
 
+       /* Fill buffer information for the userspace */
+       __fill_v4l2_buffer(vb, b);
+
        dprintk(1, "qbuf of buffer %d succeeded\n", vb->v4l2_buf.index);
        return 0;
 }