Commit f4ae8117 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

qcap/vfwcapture: Do not fail vfw_capture_init_stream() if IMemAllocator::SetProperties() fails.

parent c768dbf9
......@@ -435,7 +435,7 @@ static void test_filter_state(IMediaControl *control, IMemAllocator *allocator)
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMediaControl_Pause(control);
todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMemAllocator_Decommit(allocator);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......
......@@ -197,11 +197,9 @@ static HRESULT vfw_capture_init_stream(struct strmbase_filter *iface)
req_props.cbBuffer = get_image_size(filter);
req_props.cbAlign = 1;
req_props.cbPrefix = 0;
if (FAILED(hr = IMemAllocator_SetProperties(filter->source.pAllocator, &req_props, &ret_props)))
{
if (FAILED(hr = IMemAllocator_SetProperties(filter->source.pAllocator, &req_props, &ret_props))
&& hr != VFW_E_ALREADY_COMMITTED)
ERR("Failed to set allocator properties (buffer size %u), hr %#x.\n", req_props.cbBuffer, hr);
return hr;
}
if (FAILED(hr = IMemAllocator_Commit(filter->source.pAllocator)))
ERR("Failed to commit allocator, hr %#x.\n", hr);
......
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