diff options
Diffstat (limited to 'live.c')
-rw-r--r-- | live.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -385,6 +385,7 @@ int main(int argc __attribute__((__unused__)), char *argv[] __attribute__((__unu { struct v4l2_mbus_framefmt view_format; struct v4l2_buffers_pool *pool = NULL; + struct v4l2_pix_format format; struct timespec start, end; unsigned int buffers = 3; struct v4l2_rect rect; @@ -455,7 +456,11 @@ int main(int argc __attribute__((__unused__)), char *argv[] __attribute__((__unu goto cleanup; } - vo = vo_init(vo_devname, &vo_ops, buffers, rect.width, rect.height); + memset(&format, 0, sizeof format); + format.pixelformat = V4L2_PIX_FMT_YUYV; + format.width = rect.width; + format.height = rect.height; + vo = vo_init(vo_devname, &vo_ops, buffers, &format); if (vo == NULL) { printf("error: unable to initialize video output\n"); goto cleanup; |