Skip to content

Commit

Permalink
V4L/DVB: v4l: videobuf: qbuf now uses relevant v4l2_buffer fields for…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Pawel Osciak authored and Mauro Carvalho Chehab committed May 19, 2010
1 parent 72fcf2a commit 96f2ec6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/media/video/videobuf-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,13 @@ int videobuf_qbuf(struct videobuf_queue *q, struct v4l2_buffer *b)
"but buffer addr is zero!\n");
goto done;
}
if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT
|| q->type == V4L2_BUF_TYPE_VBI_OUTPUT
|| q->type == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT) {
buf->size = b->bytesused;
buf->field = b->field;
buf->ts = b->timestamp;
}
break;
case V4L2_MEMORY_USERPTR:
if (b->length < buf->bsize) {
Expand Down

0 comments on commit 96f2ec6

Please sign in to comment.