[PATCH v2 0/1] MR7624: qcap: Check the subtype of video format.
-- v2: qcap: Check the subtype of video format. https://gitlab.winehq.org/wine/wine/-/merge_requests/7624
From: Haoyang Chen <chenhaoyang(a)kylinos.cn> --- dlls/qcap/tests/videocapture.c | 8 ++++++++ dlls/qcap/v4l.c | 1 + 2 files changed, 9 insertions(+) diff --git a/dlls/qcap/tests/videocapture.c b/dlls/qcap/tests/videocapture.c index 3569bf33da4..d94c3387c60 100644 --- a/dlls/qcap/tests/videocapture.c +++ b/dlls/qcap/tests/videocapture.c @@ -208,6 +208,14 @@ static void test_stream_config(IPin *pin) DeleteMediaType(format); } + if(winetest_platform_is_wine) + { + hr = IAMStreamConfig_GetFormat(stream_config, &format); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + format->subtype = MEDIASUBTYPE_UYVY; /* we currently only support rgb24, so setting yuv should fail. */ + hr = IAMStreamConfig_SetFormat(stream_config, format); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + } IAMStreamConfig_Release(stream_config); } diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 5ab9613b4e2..5efb4b7e505 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -141,6 +141,7 @@ static const struct caps *find_caps(struct video_capture_device *device, const A struct caps *caps = &device->caps[index]; if (IsEqualGUID(&mt->formattype, &caps->media_type.formattype) + && IsEqualGUID(&mt->subtype, &caps->media_type.subtype) && video_info->bmiHeader.biWidth == caps->video_info.bmiHeader.biWidth && video_info->bmiHeader.biHeight == caps->video_info.bmiHeader.biHeight) return caps; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7624
Sorry for the delay here, I think I lost track of this merge request, and then for the last few weeks didn't have access to my webcam to test with. I've rewritten the tests to be more holistic, and actually test Windows behaviour instead of just Wine behaviour, and submitted as !8847. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7624#note_114043
On Wed Sep 10 06:32:40 2025 +0000, Elizabeth Figura wrote:
Sorry for the delay here, I think I lost track of this merge request, and then for the last few weeks didn't have access to my webcam to test with. I've rewritten the tests to be more holistic, and actually test Windows behaviour instead of just Wine behaviour, and submitted as !8847. Ok, Thanks.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7624#note_115515
This merge request was closed by Haoyang Chen. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7624
participants (3)
-
Elizabeth Figura (@zfigura) -
Haoyang Chen -
Haoyang Chen (@chenhaoyang)