aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.15/950-0496-staging-bcm2835-v4l2_codec-Fix-for-encode-selection-.patch
blob: 57b4f302caadf1a7d7a273bccb34cc00fe5f6ac6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From a9bf65dcc609ee839a705e7301a3846ae09c75d0 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com>
Date: Tue, 14 Sep 2021 16:44:18 +0100
Subject: [PATCH] staging/bcm2835-v4l2_codec: Fix for encode selection
 API

Matches correct behaviour from DECODE and DEINTERLACE

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
---
 .../staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
+++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
@@ -1819,7 +1819,7 @@ static int vidioc_s_selection(struct fil
 			s->r.top = 0;
 			s->r.left = 0;
 			s->r.width = min(s->r.width, q_data->crop_width);
-			s->r.height = min(s->r.height, q_data->crop_height);
+			s->r.height = min(s->r.height, q_data->height);
 			q_data->crop_width = s->r.width;
 			q_data->crop_height = s->r.height;
 			q_data->selection_set = true;