Commit 83bdfb78 authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

amstream: Return VFW_E_TYPE_NOT_ACCEPTED on error in AMVideoStream::QueryAccept().

parent ddcabfa2
......@@ -798,7 +798,7 @@ static HRESULT WINAPI ddraw_sink_QueryId(IPin *iface, WCHAR **id)
static HRESULT WINAPI ddraw_sink_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *mt)
{
TRACE("iface %p, mt %p.\n", iface, mt);
return check_media_type(mt) ? S_OK : S_FALSE;
return check_media_type(mt) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED;
}
static HRESULT WINAPI ddraw_sink_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_media_types)
......
......@@ -1958,20 +1958,21 @@ static void test_media_types(void)
pmt->majortype = MEDIATYPE_NULL;
hr = IPin_QueryAccept(pin, pmt);
todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
pmt->majortype = MEDIATYPE_Audio;
hr = IPin_QueryAccept(pin, pmt);
todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
pmt->majortype = MEDIATYPE_Stream;
hr = IPin_QueryAccept(pin, pmt);
todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
pmt->majortype = MEDIATYPE_Video;
for (i = 0; i < ARRAY_SIZE(rejected_subtypes); ++i)
{
pmt->subtype = *rejected_subtypes[i];
hr = IPin_QueryAccept(pin, pmt);
todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x for subtype %s.\n",
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]));
}
......
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