summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-04-16 14:43:41 +0200
committerOliver Wolff <oliver.wolff@qt.io>2018-04-17 05:50:39 +0000
commit32b8e622c0b551d8f67a64a9dee834c5732bfea8 (patch)
treed05706013d444316e5e7ea41008490b0911a2777 /src
parent9248dc9d16d5d4dc8fdfaf17344ca59f4a4eb7c4 (diff)
DirectShowUtils::connectFilters: Return false if every pin fails
If every pin connection fails, the result of the function should be false. It does not matter if graph->EnumFilters(&f); failed or succeeded. Change-Id: I87ec6bcda5d5dbe60154b39e21c73af1dd06fe3d Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/directshow/common/directshowutils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/directshow/common/directshowutils.cpp b/src/plugins/directshow/common/directshowutils.cpp
index 93782e546..989239b88 100644
--- a/src/plugins/directshow/common/directshowutils.cpp
+++ b/src/plugins/directshow/common/directshowutils.cpp
@@ -285,7 +285,7 @@ bool DirectShowUtils::connectFilters(IGraphBuilder *graph,
// Try to connect to the upstream filter first.
if (findAndConnect(upstreamFilter))
- return S_OK;
+ return false;
const auto getFilters = [graph, hrOut]() -> IEnumFilters * {
IEnumFilters *f = nullptr;
@@ -304,10 +304,10 @@ bool DirectShowUtils::connectFilters(IGraphBuilder *graph,
while (S_OK == filters->Next(1, &nextFilter, 0)) {
const ScopedSafeRelease<IBaseFilter> releaseNextFilter { &nextFilter };
if (nextFilter && findAndConnect(nextFilter))
- break;
+ return true;
}
- return SUCCEEDED(*hrOut);
+ return false;
}
QT_END_NAMESPACE