summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2018-04-20 14:25:03 +0200
committerAndy Shaw <andy.shaw@qt.io>2018-06-20 13:00:01 +0000
commit91bab737cbb1b50e89856a3061cbdb2d53af1e23 (patch)
tree968027400b5244741d0a2158ba69de206fe8dffc
parent2f7b546540c11a4697ee7bc363c7ac7cc5b053b4 (diff)
Directshow: Don't report failure for stream source with no video output
The video output is set after it has handled this doRender() call which means that it would report an error with the media, even though it was renderable. This approach ensures that it does not report an error and will correctly report as loaded in this case. Change-Id: I6ec6abb82dcdd8f122e198ff6a765cf83931ee10 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/plugins/directshow/player/directshowplayerservice.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/directshow/player/directshowplayerservice.cpp b/src/plugins/directshow/player/directshowplayerservice.cpp
index d7d190c6a..b975677a6 100644
--- a/src/plugins/directshow/player/directshowplayerservice.cpp
+++ b/src/plugins/directshow/player/directshowplayerservice.cpp
@@ -521,9 +521,9 @@ void DirectShowPlayerService::doRender(QMutexLocker *locker)
peer->Release();
} else {
locker->unlock();
- HRESULT hr;
- if (SUCCEEDED(hr = graph->RenderEx(
- pin, /*AM_RENDEREX_RENDERTOEXISTINGRENDERERS*/ 1, 0))) {
+ HRESULT hr = graph->RenderEx(pin, /*AM_RENDEREX_RENDERTOEXISTINGRENDERERS*/ 1, 0);
+ // Do not return an error if no video output is set yet.
+ if (SUCCEEDED(hr) || !(m_executedTasks & SetVideoOutput)) {
rendered = true;
} else if (renderHr == S_OK || renderHr == VFW_E_NO_DECOMPRESSOR){
renderHr = hr;