Signed-off-by: Tim Clem tclem@codeweavers.com --- dlls/quartz/tests/filtergraph.c | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index fdcfcead0be..f0d7d7c275e 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -4186,6 +4186,45 @@ static void test_ec_complete(void) ok(filter3.ref == 1, "Got outstanding refcount %d.\n", filter3.ref); }
+static void test_renderfile_failure(void) +{ + static const char bogus_data[20] = {0xde, 0xad, 0xbe, 0xef}; + + struct testfilter testfilter; + IFilterGraph2 *graph; + IEnumFilters *filterenum; + IBaseFilter *filter; + HRESULT hr; + const WCHAR *filename; + + /* Windows removes the source filter from the graph if a RenderFile + * call fails. It leaves the rest of the graph intact. */ + + graph = create_graph(); + testfilter_init(&testfilter, NULL, 0); + hr = IFilterGraph2_AddFilter(graph, &testfilter.IBaseFilter_iface, L"dummy"); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + filename = create_file(L"test.nonsense", bogus_data, sizeof(bogus_data)); + hr = IFilterGraph2_RenderFile(graph, filename, NULL); + todo_wine ok(hr == VFW_E_UNSUPPORTED_STREAM, "Got hr %#x.\n", hr); + + hr = IFilterGraph2_EnumFilters(graph, &filterenum); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + 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); + + hr = IEnumFilters_Next(filterenum, 1, &filter, NULL); + todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + IEnumFilters_Release(filterenum); + + IFilterGraph2_Release(graph); + todo_wine ok(DeleteFileW(filename), "Failed to delete temporary file.\n"); +} + /* Remove and re-add the filter, to flush the graph's internal * IMediaSeeking cache. Don't expose IMediaSeeking when adding, to show * that it's only queried when needed. */ @@ -5645,6 +5684,7 @@ START_TEST(filtergraph) test_sync_source(); test_filter_state(); test_ec_complete(); + test_renderfile_failure(); test_graph_seeking(); test_default_sync_source(); test_add_source_filter();
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 f0d7d7c275e..b0de269647d 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -4214,15 +4214,15 @@ 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, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#x.\n", hr);
IEnumFilters_Release(filterenum);
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
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=93249
Your paranoid android.
=== debiant2 (build log) ===
winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind: winegstreamer: error: typefind: Die Art des Datenstroms konnte nicht ermittelt werden. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: Die Art des Datenstroms konnte nicht ermittelt werden. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind: winegstreamer: error: typefind: Impossible de déterminer le type du flux. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: Impossible de déterminer le type du flux. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind: winegstreamer: error: typefind: ストリームの種類を判別できません winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: ストリームの種類を判別できません winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind: winegstreamer: error: typefind: 无法确定流类型。 winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: 无法确定流类型。 winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind:
=== debiant2 (build log) ===
winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind:
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=93248
Your paranoid android.
=== debiant2 (build log) ===
winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind: winegstreamer: error: typefind: Die Art des Datenstroms konnte nicht ermittelt werden. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: Die Art des Datenstroms konnte nicht ermittelt werden. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind: winegstreamer: error: typefind: Impossible de déterminer le type du flux. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: Impossible de déterminer le type du flux. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: ストリームの種類を判別できません winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: ストリームの種類を判別できません winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: 无法确定流类型。 winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: 无法确定流类型。 winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind:
=== debiant2 (build log) ===
winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin8/GstDecodeBin:decodebin8/GstTypeFindElement:typefind: winegstreamer: error: typefind: Could not determine type of stream. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1161): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind winegstreamer: error: typefind: Internal data stream error. winegstreamer: error: typefind: ../plugins/elements/gsttypefindelement.c(1232): gst_type_find_element_loop (): /GstBin:bin9/GstDecodeBin:decodebin9/GstTypeFindElement:typefind: