Commit fddae90d authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

amstream: Validate the format type in check_media_type().

parent 83bdfb78
......@@ -634,7 +634,8 @@ 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->majortype, &MEDIATYPE_Video)
&& IsEqualGUID(&media_type->formattype, &FORMAT_VideoInfo))
{
if (IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB1) ||
IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB4) ||
......
......@@ -1946,8 +1946,7 @@ 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);
ok(hr == (i == 6) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
}
pmt->bFixedSizeSamples = FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment