Module: wine Branch: master Commit: 763fc7cf3a48709473090f3c53f03217b4e56344 URL: http://source.winehq.org/git/wine.git/?a=commit;h=763fc7cf3a48709473090f3c53...
Author: Chris Robinson chris.kcat@gmail.com Date: Sat Feb 17 23:55:20 2007 -0800
quartz: Make sure the splitter has output plugins before trying to render them.
---
dlls/quartz/filtergraph.c | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index ebda643..8b38a3b 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -1057,20 +1057,26 @@ static HRESULT WINAPI GraphBuilder_RenderFile(IGraphBuilder *iface, IEnumPins_Release(penumpins);
hr = IPin_Connect(ppinreader, ppinsplitter, NULL); - if (FAILED(hr)) { + if (SUCCEEDED(hr)) { + /* Make sure there's some output pins in the filter */ + hr = GetInternalConnections(psplitter, ppinsplitter, &ppins, &nb); + if(SUCCEEDED(hr)) { + if(nb > 0) { + TRACE("Successfully connected to filter\n"); + break; + } + CoTaskMemFree(ppins); + ppins = NULL; + TRACE("No output pins found in filter\n"); + } IBaseFilter_Release(ppinsplitter); ppinsplitter = NULL; - TRACE("Cannot connect to filter (%x), trying next one\n", hr); - continue; } - TRACE("Successfully connected to filter\n"); - break; + TRACE("Cannot connect to filter (%x), trying next one\n", hr); + hr = E_FAIL; }
/* Render all output pin of the splitter by calling IGraphBuilder_Render on each of them */ - if (SUCCEEDED(hr)) - hr = GetInternalConnections(psplitter, ppinsplitter, &ppins, &nb); - if (SUCCEEDED(hr)) { int i; TRACE("pins to consider: %d\n", nb);