return 0;
}
-static int v4l2_pix_fmt_identical(struct v4l2_format *a, struct v4l2_format *b)
+static int v4l2_pix_fmt_compat(struct v4l2_format *a, struct v4l2_format *b)
{
if (a->fmt.pix.width == b->fmt.pix.width &&
a->fmt.pix.height == b->fmt.pix.height &&
dest_fmt->fmt.pix.field = src_fmt->fmt.pix.field;
dest_fmt->fmt.pix.colorspace = src_fmt->fmt.pix.colorspace;
/* When we're not converting use bytesperline and imagesize from src_fmt */
- if (v4l2_pix_fmt_identical(src_fmt, dest_fmt)) {
+ if (v4l2_pix_fmt_compat(src_fmt, dest_fmt)) {
dest_fmt->fmt.pix.bytesperline = src_fmt->fmt.pix.bytesperline;
dest_fmt->fmt.pix.sizeimage = src_fmt->fmt.pix.sizeimage;
}
/* Don't be lazy on uvc cams, as this triggers a bug in the uvcvideo
driver in kernel <= 2.6.28 (with certain cams) */
if (!(devices[index].flags & V4L2_IS_UVC) &&
- v4l2_pix_fmt_identical(&devices[index].dest_fmt, dest_fmt)) {
+ v4l2_pix_fmt_compat(&devices[index].dest_fmt, dest_fmt)) {
*dest_fmt = devices[index].dest_fmt;
result = 0;
break;
/* Maybe after try format has adjusted width/height etc, to whats
available nothing has changed (on the cam side) ? */
if (!(devices[index].flags & V4L2_IS_UVC) &&
- v4l2_pix_fmt_identical(&devices[index].src_fmt, &src_fmt)) {
+ v4l2_pix_fmt_compat(&devices[index].src_fmt, &src_fmt)) {
v4l2_set_src_and_dest_format(index, &devices[index].src_fmt,
dest_fmt);
result = 0;