qcap/vfwcapture: Do not fail vfw_capture_init_stream() if IMemAllocator::SetProperties() fails.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c768dbf97f
commit
f4ae8117c4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue