media: ti-vpe: vip: fix try_format for interlaced frames usecase
[android-sdk/kernel-video.git] / drivers / media / platform / ti-vpe / vip.c
index 50f4b1bbddc624e96d6d41e6b13bdbf98089d34e..ab0b961dd1dcaec00ab06e6a76e10dac9949df43 100644 (file)
@@ -1530,7 +1530,9 @@ static int vip_try_fmt_vid_cap(struct file *file, void *priv,
 
                if (fsize.type == V4L2_FRMSIZE_TYPE_DISCRETE) {
                        if ((f->fmt.pix.width == fsize.discrete.width) &&
-                           (f->fmt.pix.height == fsize.discrete.height)) {
+                           (((f->fmt.pix.field == V4L2_FIELD_ALTERNATE) ?
+                           f->fmt.pix.height * 2 : f->fmt.pix.height) ==
+                           fsize.discrete.height)) {
                                found = true;
                                break;
                        }