File: Fix-loop-variable-bug-in-V4L2-camera-format-enumeration.patch

package info (click to toggle)
libsdl3 3.3.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 42,808 kB
  • sloc: ansic: 427,637; objc: 12,991; xml: 9,513; cpp: 8,769; perl: 4,667; python: 3,538; sh: 924; makefile: 268; cs: 56
file content (22 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Qiu Qiang <qqiu@qiuleyan.com>
Date: Sun, 7 Dec 2025 16:47:15 -0500
Subject: Fix loop variable bug in V4L2 camera format enumeration

Origin: upstream, 3.3.6, commit:19988c5faad259aa47bd9bfac63f3000f1d10d3d
---
 src/camera/v4l2/SDL_camera_v4l2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/camera/v4l2/SDL_camera_v4l2.c b/src/camera/v4l2/SDL_camera_v4l2.c
index 0fd078b..fbaf4e1 100644
--- a/src/camera/v4l2/SDL_camera_v4l2.c
+++ b/src/camera/v4l2/SDL_camera_v4l2.c
@@ -801,7 +801,7 @@ static void MaybeAddDevice(const char *path)
                 const int stepw = (int) frmsizeenum.stepwise.step_width;
                 const int steph = (int) frmsizeenum.stepwise.step_height;
                 for (int w = minw; w <= maxw; w += stepw) {
-                    for (int h = minh; w <= maxh; w += steph) {
+                    for (int h = minh; h <= maxh; h += steph) {
                         #if DEBUG_CAMERA
                         SDL_Log("CAMERA:     * Has %s size %dx%d", (frmsizeenum.type == V4L2_FRMSIZE_TYPE_STEPWISE) ? "stepwise" : "continuous", w, h);
                         #endif