From: Gijs Vermeulen gijsvrm@gmail.com
Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/amstream/ddrawstream.c | 21 +++++---------------- dlls/amstream/tests/amstream.c | 5 ++--- 2 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/dlls/amstream/ddrawstream.c b/dlls/amstream/ddrawstream.c index 9fcb6d37cee..5530603f7aa 100644 --- a/dlls/amstream/ddrawstream.c +++ b/dlls/amstream/ddrawstream.c @@ -632,23 +632,12 @@ static HRESULT WINAPI ddraw_sink_Connect(IPin *iface, IPin *peer, const AM_MEDIA return E_UNEXPECTED; }
-static BOOL check_media_type(const AM_MEDIA_TYPE *media_type) +static BOOL check_media_type(const AM_MEDIA_TYPE *mt) { - if (IsEqualGUID(&media_type->majortype, &MEDIATYPE_Video) - && IsEqualGUID(&media_type->formattype, &FORMAT_VideoInfo)) - { - 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; - } - } + if (IsEqualGUID(&mt->majortype, &MEDIATYPE_Video) + && IsEqualGUID(&mt->subtype, &MEDIASUBTYPE_RGB8) + && IsEqualGUID(&mt->formattype, &FORMAT_VideoInfo)) + return TRUE;
return FALSE; } diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 1fa1f2432c5..bbad585d48a 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -1970,9 +1970,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);