diff options
Diffstat (limited to 'v4l2-apps/libv4l/libv4lconvert')
-rw-r--r-- | v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h | 1 | ||||
-rw-r--r-- | v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h index 5ce7bde3b..4e6130d3c 100644 --- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h +++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h @@ -90,6 +90,7 @@ #define V4LCONVERT_ROTATE_90 0x01 #define V4LCONVERT_ROTATE_180 0x02 #define V4LCONVERT_IS_UVC 0x04 +#define V4LCONVERT_IS_SN9C20X 0x08 /* Pixformat flags */ #define V4LCONVERT_COMPRESSED 0x01 diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c index 1204e8ef2..5467c695a 100644 --- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c +++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c @@ -166,6 +166,8 @@ struct v4lconvert_data *v4lconvert_create(int fd) if (syscall(SYS_ioctl, fd, VIDIOC_QUERYCAP, &cap) == 0) { if (!strcmp((char *)cap.driver, "uvcvideo")) data->flags |= V4LCONVERT_IS_UVC; + else if (!strcmp((char *)cap.driver, "sn9c20x")) + data->flags |= V4LCONVERT_IS_SN9C20X; } return data; @@ -541,7 +543,8 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data, are best thrown away to avoid flashes in the video stream. Tell the upper layer this is an intermediate fault and it should try again with a new buffer by setting errno to EAGAIN */ - if (src_pix_fmt == V4L2_PIX_FMT_PJPG) { + if (src_pix_fmt == V4L2_PIX_FMT_PJPG || + data->flags & V4LCONVERT_IS_SN9C20X) { V4LCONVERT_ERR("decompressing JPEG: %s", tinyjpeg_get_errorstring(data->jdec)); errno = EAGAIN; |