diff options
Diffstat (limited to 'v4l2-apps/libv4l/libv4l2')
-rw-r--r-- | v4l2-apps/libv4l/libv4l2/libv4l2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/v4l2-apps/libv4l/libv4l2/libv4l2.c b/v4l2-apps/libv4l/libv4l2/libv4l2.c index 91e0193ee..8d01b034c 100644 --- a/v4l2-apps/libv4l/libv4l2/libv4l2.c +++ b/v4l2-apps/libv4l/libv4l2/libv4l2.c @@ -516,6 +516,14 @@ int v4l2_fd_open(int fd, int v4l2_flags) V4L2_LOG("open: %d\n", fd); + if (v4lconvert_supported_dst_fmt_only(convert) && + !v4lconvert_supported_dst_format(fmt.fmt.pix.pixelformat)) { + V4L2_LOG("open %d: setting pixelformat to RGB24\n", fd); + fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_RGB24; + v4l2_ioctl(fd, VIDIOC_S_FMT, &fmt); + V4L2_LOG("open %d: done setting pixelformat\n", fd); + } + return fd; } |