From d2f449bd7355706e6a43567c186df6425a5b1734 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 15 Jan 2026 23:02:36 +0100 Subject: [PATCH] v4l2: prefer yuyv over mjpeg if all other factors are equal --- src/capture/v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/capture/v4l2.c b/src/capture/v4l2.c index 53a3782..fdb61bb 100644 --- a/src/capture/v4l2.c +++ b/src/capture/v4l2.c @@ -336,7 +336,7 @@ static bool gsr_capture_v4l2_get_best_matching_setup( setup_framerate = 50000; } - const uint64_t match_score = setup_resolution_width * setup_resolution_height * setup_framerate; + const uint64_t match_score = setup_resolution_width * setup_resolution_height * setup_framerate + (pixfmt == GSR_CAPTURE_V4L2_PIXFMT_YUYV ? 5 : 0); if(match_score > best_match_score) { best_match_score = match_score; best_match_index = i;