summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-06-21 11:06:59 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-06-21 11:06:59 +0200
commitd5894b0d3a62375eead5974658df270f69d06a1f (patch)
tree09c6067fdc451338529ee179bda54b6e2e575ed0 /linux/drivers/media/video/ivtv
parent41951ee0d067ea4a4175ee933d993bbed9a258a2 (diff)
downloadmediapointer-dvb-s2-d5894b0d3a62375eead5974658df270f69d06a1f.tar.gz
mediapointer-dvb-s2-d5894b0d3a62375eead5974658df270f69d06a1f.tar.bz2
ivtv: fill in all v4l2_framebuffer fields in VIDIOC_G/S_FBUF
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/ivtv')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-ioctl.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-ioctl.c b/linux/drivers/media/video/ivtv/ivtv-ioctl.c
index eb4485991..d75c82e50 100644
--- a/linux/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/linux/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -1356,7 +1356,15 @@ static int ivtv_g_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *fb)
fb->fmt.pixelformat = pixel_format[pixfmt];
fb->fmt.width = itv->osd_rect.width;
fb->fmt.height = itv->osd_rect.height;
+ fb->fmt.field = V4L2_FIELD_INTERLACED;
+ fb->fmt.bytesperline = fb->fmt.width;
+ if (fb->fmt.pixelformat != V4L2_PIX_FMT_PAL8)
+ fb->fmt.bytesperline *= 2;
+ if (fb->fmt.pixelformat == V4L2_PIX_FMT_RGB32 ||
+ fb->fmt.pixelformat == V4L2_PIX_FMT_YUV32)
+ fb->fmt.bytesperline *= 2;
fb->base = (void *)itv->osd_video_pbase;
+ fb->flags = 0;
if (itv->osd_chroma_key_state)
fb->flags |= V4L2_FBUF_FLAG_CHROMAKEY;
@@ -1404,8 +1412,7 @@ static int ivtv_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *fb)
itv->osd_chroma_key_state = (fb->flags & V4L2_FBUF_FLAG_CHROMAKEY) != 0;
ivtv_set_osd_alpha(itv);
yi->track_osd = (fb->flags & V4L2_FBUF_FLAG_OVERLAY) != 0;
-
- return 0;
+ return ivtv_g_fbuf(file, fh, fb);
}
static int ivtv_overlay(struct file *file, void *fh, unsigned int on)