meta-digi-dey: dey-examples-v4l2: The VIDIOC_G_FMT syscall needs a format

type.

Newer kernels (3.x) return an error if this is not the case.

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
This commit is contained in:
Alex Gonzalez 2014-05-19 11:51:06 +02:00
parent d0fc504a1e
commit 45f09525f4
1 changed files with 1 additions and 0 deletions

View File

@ -381,6 +381,7 @@ int v4l2_set_format_overlay(int fd, int top, int left, int height, int width)
int ret = 0;
/* Get the data format */
format.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
if ((ret = ioctl(fd, VIDIOC_G_FMT, &format)) < 0) {
log("Get format failed with %d\n", ret);
return ret;