[vlc-devel] [PATCH] v4l2: Fix SetupFormat for CONTINUOUS framesize

Ricardo Ribalda Delgado ricardo.ribalda at gmail.com
Wed Apr 15 20:42:08 CEST 2015

One of the bounds of the loop were wrong, ending up in testing
formats that were not supported by the hardware.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>

Stupid Related question. Why vlc prefers fast frames in favour of
big frames?

I have a camera that supports framesizes from 4x1 to 1024x1024, and 
the tiny useless frames are autoselected :S.

Would a patch to invert this preference be accepted?


ps: Sorry for the multiple post, it is my first patch to the mailing
list and so far I havent been able to see it on


 modules/access/v4l2/video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/access/v4l2/video.c b/modules/access/v4l2/video.c
index fe5d1c9..b8544ea 100644
--- a/modules/access/v4l2/video.c
+++ b/modules/access/v4l2/video.c
@@ -508,7 +508,7 @@ int SetupFormat (vlc_object_t *obj, int fd, uint32_t fourcc,
                           width <= fse.stepwise.max_width;
                           width += fse.stepwise.step_width)
                 for (uint32_t height =  fse.stepwise.min_height;
-                              height <= fse.stepwise.max_width;
+                              height <= fse.stepwise.max_height;
                               height += fse.stepwise.step_height)
                     struct v4l2_fract cur_it;

More information about the vlc-devel mailing list