diff options
Diffstat (limited to 'videoout.c')
-rw-r--r-- | videoout.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -54,7 +54,7 @@ struct videoout struct videoout *vo_init(const char *devname, const struct video_out_operations *ops, unsigned int buffers, - unsigned int width, unsigned int height) + struct v4l2_pix_format *format) { struct v4l2_pix_format pixfmt; struct v4l2_format fmt; @@ -76,9 +76,9 @@ struct videoout *vo_init(const char *devname, goto error; } - pixfmt.pixelformat = V4L2_PIX_FMT_YUYV; - pixfmt.width = width; - pixfmt.height = height; + pixfmt.pixelformat = format->pixelformat; + pixfmt.width = format->width; + pixfmt.height = format->height; pixfmt.field = V4L2_FIELD_ANY; ret = v4l2_set_format(vo->dev, &pixfmt); @@ -90,8 +90,8 @@ struct videoout *vo_init(const char *devname, fmt.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; fmt.fmt.win.w.left = 0; fmt.fmt.win.w.top = 0; - fmt.fmt.win.w.width = width; - fmt.fmt.win.w.height = height; + fmt.fmt.win.w.width = format->width; + fmt.fmt.win.w.height = format->height; ret = ioctl(vo->dev->fd, VIDIOC_S_FMT, &fmt); if (ret < 0) { perror("VIDIOC_S_FMT(overlay)\n"); |