Zebediah Figura : qcap/vfwcapture: Do not fail vfw_capture_init_stream() if IMemAllocator::SetProperties() fails.
Module: wine Branch: master Commit: f4ae8117c44c68081f0a524090213a7c757ffd86 URL: https://source.winehq.org/git/wine.git/?a=commit;h=f4ae8117c44c68081f0a52409... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Jun 14 22:47:33 2021 -0500 qcap/vfwcapture: Do not fail vfw_capture_init_stream() if IMemAllocator::SetProperties() fails. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/tests/videocapture.c | 2 +- dlls/qcap/vfwcapture.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dlls/qcap/tests/videocapture.c b/dlls/qcap/tests/videocapture.c index 530b33a1e32..c44070b0bd5 100644 --- a/dlls/qcap/tests/videocapture.c +++ b/dlls/qcap/tests/videocapture.c @@ -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); diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index 48401344ac4..ae073b845e0 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -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);
participants (1)
-
Alexandre Julliard