winrt: Fix synchronization problems to render thread
QWinRTAbstractVideoRendererControl::setActive was using QThread::requestInterrupt previously to indicate to the render thread that it is supposed to quit. However, when switching cameras you cannot tell the render thread to continue rendering. Instead start() is called and then the render thread recognized the previous interrupt request, resulting in a quit and no further rendering happening. Instead we wait for the render thread to complete by using shutdown(). Task-number: QTBUG-53722 Change-Id: Ibee2ed4f64400ca14c788984a73df4be0653ed2b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
@@ -360,7 +360,7 @@ void QWinRTAbstractVideoRendererControl::setActive(bool active)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
d->renderThread.requestInterruption();
|
shutdown();
|
||||||
if (d->surface && d->surface->isActive())
|
if (d->surface && d->surface->isActive())
|
||||||
d->surface->stop();
|
d->surface->stop();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user