From: Andrew Knight Date: Thu, 11 Dec 2014 08:52:18 +0000 (+0200) Subject: winrt: Add missing QAbstractVideoSurface::stop() call. X-Git-Tag: v5.4.1~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce7b59c28d9298b86c9db34831eefde714a7108d;p=platform%2Fupstream%2Fqtmultimedia.git winrt: Add missing QAbstractVideoSurface::stop() call. This was preventing the surface from restarting with a different format. Change-Id: I1f86ddb1b16618f167183c7e2fcb32658df578f3 Reviewed-by: Oliver Wolff --- diff --git a/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp b/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp index be04362..031a176 100644 --- a/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp +++ b/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -181,7 +182,7 @@ enum DirtyState { class QWinRTAbstractVideoRendererControlPrivate { public: - QAbstractVideoSurface *surface; + QPointer surface; QVideoSurfaceFormat format; DirtyState dirtyState; @@ -219,7 +220,6 @@ QWinRTAbstractVideoRendererControl::QWinRTAbstractVideoRendererControl(const QSi { Q_D(QWinRTAbstractVideoRendererControl); - d->surface = Q_NULLPTR; d->format = QVideoSurfaceFormat(size, QVideoFrame::Format_BGRA32, QAbstractVideoBuffer::GLTextureHandle); d->dirtyState = TextureDirty; @@ -340,6 +340,8 @@ void QWinRTAbstractVideoRendererControl::setActive(bool active) } d->renderThread.requestInterruption(); + if (d->surface && d->surface->isActive()) + d->surface->stop(); } void QWinRTAbstractVideoRendererControl::present()