Signed-off-by: Tim Clem tclem@codeweavers.com --- dlls/quartz/filtergraph.c | 7 ++++++- dlls/quartz/tests/filtergraph.c | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index f509bdad332..026b9cb8f72 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -1430,8 +1430,13 @@ static HRESULT WINAPI FilterGraph2_RenderFile(IFilterGraph2 *iface, LPCWSTR lpcw } IEnumPins_Release(penumpins);
- if (!any) + if (!any) { + hr = IFilterGraph2_RemoveFilter(iface, preader); + if (FAILED(hr)) { + WARN("Unable to remove reader for unplayable source, hr: %#x\n", hr); + } hr = VFW_E_CANNOT_RENDER; + } else if (partial) hr = VFW_S_PARTIAL_RENDER; else diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index fbe51d29efc..cc2663e4487 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -4217,16 +4217,16 @@ static void test_renderfile_failure(void)
hr = IEnumFilters_Next(filterenum, 1, &filter, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(filter == &testfilter.IBaseFilter_iface, "Got unexpected filter %p.\n", filter); + ok(filter == &testfilter.IBaseFilter_iface, "Got unexpected filter %p.\n", filter);
hr = IEnumFilters_Next(filterenum, 1, &filter, NULL); - todo_wine ok(hr == S_FALSE, "Expected only one filter in the graph.\n"); + ok(hr == S_FALSE, "Expected only one filter in the graph.\n");
IEnumFilters_Release(filterenum);
out: IFilterGraph2_Release(graph); - todo_wine ok(DeleteFileW(filename), "Failed to delete temporary file.\n"); + ok(DeleteFileW(filename), "Failed to delete temporary file.\n"); }
/* Remove and re-add the filter, to flush the graph's internal