[PATCH] ov772x: add support S_CROP operation.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ov772x_set_fmt had returned NULL when pixfmt is 0,
although it mean only geometry change.
This patch modify this problem.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@xxxxxxxxxxx>
---
 drivers/media/video/ov772x.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c
index 681a11b..30eb80e 100644
--- a/drivers/media/video/ov772x.c
+++ b/drivers/media/video/ov772x.c
@@ -792,12 +792,15 @@ static int ov772x_set_fmt(struct soc_camera_device *icd,
 
 	/*
 	 * select format
+	 * when pixfmt is 0, only geometry change
 	 */
-	priv->fmt = NULL;
-	for (i = 0; i < ARRAY_SIZE(ov772x_cfmts); i++) {
-		if (pixfmt == ov772x_cfmts[i].fourcc) {
-			priv->fmt = ov772x_cfmts + i;
-			break;
+	if (pixfmt) {
+		priv->fmt = NULL;
+		for (i = 0; i < ARRAY_SIZE(ov772x_cfmts); i++) {
+			if (pixfmt == ov772x_cfmts[i].fourcc) {
+				priv->fmt = ov772x_cfmts + i;
+				break;
+			}
 		}
 	}
 	if (!priv->fmt)
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux