From: Brendan McGrath <bmcgrath@codeweavers.com> --- dlls/amstream/ddrawstream.c | 4 +++- dlls/amstream/tests/amstream.c | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/amstream/ddrawstream.c b/dlls/amstream/ddrawstream.c index cdb1cfd3178..55ab7ab25d4 100644 --- a/dlls/amstream/ddrawstream.c +++ b/dlls/amstream/ddrawstream.c @@ -988,7 +988,9 @@ static HRESULT WINAPI enum_media_types_Next(IEnumMediaTypes *iface, ULONG count, mts[0] = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); memset(mts[0], 0, sizeof(AM_MEDIA_TYPE)); mts[0]->majortype = MEDIATYPE_Video; - if (enum_media_types->stream->format.flags & DDSD_PIXELFORMAT) + if (enum_media_types->stream->peer) + mts[0]->subtype = enum_media_types->stream->mt.subtype; + else if (enum_media_types->stream->format.flags & DDSD_PIXELFORMAT) subtype_from_pf(&mts[0]->subtype, &format->pf); else mts[0]->subtype = MEDIASUBTYPE_RGB8; diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index cba1f2f7443..b3f555fa735 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -3185,10 +3185,8 @@ static void test_media_types(void) hr = IEnumMediaTypes_Next(enummt, 1, &pmt, &count); ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&pmt->majortype, &MEDIATYPE_Video), "Unexpected media type %s.\n", wine_dbgstr_guid(&pmt->majortype)); - todo_wine ok(IsEqualGUID(&pmt->subtype, rejected_subtypes[i].guid), "Unexpected media subtype %s.\n", wine_dbgstr_guid(&pmt->subtype)); ok(IsEqualGUID(&pmt->formattype, &GUID_NULL), "Unexpected media formattype %s.\n", wine_dbgstr_guid(&pmt->formattype)); - todo_wine ok(pmt->lSampleSize == 40000 * rejected_subtypes[i].bytes_per_pixel, "Unexpected sample size %lu.\n", pmt->lSampleSize); DeleteMediaType(pmt); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10677