Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com --- dlls/amstream/ddrawstream.c | 16 ++++------------ dlls/amstream/tests/amstream.c | 6 ++---- 2 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/dlls/amstream/ddrawstream.c b/dlls/amstream/ddrawstream.c index 6f5d226d35..c697aa4318 100644 --- a/dlls/amstream/ddrawstream.c +++ b/dlls/amstream/ddrawstream.c @@ -634,19 +634,11 @@ static HRESULT WINAPI ddraw_sink_Connect(IPin *iface, IPin *peer, const AM_MEDIA
static BOOL check_media_type(const AM_MEDIA_TYPE *media_type) { - if (IsEqualGUID(&media_type->majortype, &MEDIATYPE_Video)) + if (IsEqualGUID(&media_type->formattype, &FORMAT_VideoInfo) && + IsEqualGUID(&media_type->majortype, &MEDIATYPE_Video) && + IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB8)) { - if (IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB1) || - IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB4) || - IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB8) || - IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB565) || - IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB555) || - IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB24) || - IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB32)) - { - TRACE("Video sub-type %s matches\n", debugstr_guid(&media_type->subtype)); - return TRUE; - } + return TRUE; }
return FALSE; diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 3e74b611f5..de43708eb3 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -1943,7 +1943,6 @@ static void test_media_types(void) pmt->cbFormat = tests[i].size; pmt->pbFormat = tests[i].format; hr = IPin_QueryAccept(pin, pmt); - todo_wine_if (i != 6) ok(hr == (i == 6) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); }
@@ -1968,9 +1967,8 @@ static void test_media_types(void) { pmt->subtype = *rejected_subtypes[i]; hr = IPin_QueryAccept(pin, pmt); - todo_wine_if (i < 6) - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x for subtype %s.\n", - hr, wine_dbgstr_guid(rejected_subtypes[i])); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x for subtype %s.\n", + hr, wine_dbgstr_guid(rejected_subtypes[i])); }
CoTaskMemFree(pmt);