aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videobuf-core.c
diff options
context:
space:
mode:
authorPawel Osciak <p.osciak@samsung.com>2010-04-21 05:44:27 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:58:11 -0400
commit96f2ec67b8d4761471409e1df0adfe4da5262f84 (patch)
treef98aa4ca20471a38c82a5624f9cc0f5223fb4eed /drivers/media/video/videobuf-core.c
parent72fcf2a8daac43f8e3bce62a1c1124859b323006 (diff)
V4L/DVB: v4l: videobuf: qbuf now uses relevant v4l2_buffer fields for OUTPUT types
According to the V4L2 specification, applications set bytesused, field and timestamp fields of struct v4l2_buffer when the buffer is intended for output and memory type is MMAP. This adds proper copying of those values to videobuf_buffer so drivers can use them. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/videobuf-core.c')
-rw-r--r--drivers/media/video/videobuf-core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index dc2f6a8c0225..9f99e3bf5392 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -544,6 +544,13 @@ int videobuf_qbuf(struct videobuf_queue *q, struct v4l2_buffer *b)
544 "but buffer addr is zero!\n"); 544 "but buffer addr is zero!\n");
545 goto done; 545 goto done;
546 } 546 }
547 if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT
548 || q->type == V4L2_BUF_TYPE_VBI_OUTPUT
549 || q->type == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT) {
550 buf->size = b->bytesused;
551 buf->field = b->field;
552 buf->ts = b->timestamp;
553 }
547 break; 554 break;
548 case V4L2_MEMORY_USERPTR: 555 case V4L2_MEMORY_USERPTR:
549 if (b->length < buf->bsize) { 556 if (b->length < buf->bsize) {