diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-12-11 10:52:18 +0200 |
---|---|---|
committer | Andrew Knight <andrew.knight@theqtcompany.com> | 2014-12-11 16:49:07 +0100 |
commit | ce7b59c28d9298b86c9db34831eefde714a7108d (patch) | |
tree | 9a6257c15a7c38218813e68269383a65bd3143b6 /src/plugins | |
parent | 1027215920ded41b0e381b0ab740fb8a75c66a62 (diff) | |
download | qtmultimedia-ce7b59c28d9298b86c9db34831eefde714a7108d.tar.gz |
winrt: Add missing QAbstractVideoSurface::stop() call.
This was preventing the surface from restarting with a different format.
Change-Id: I1f86ddb1b16618f167183c7e2fcb32658df578f3
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp b/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp index be0436261..031a176fc 100644 --- a/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp +++ b/src/plugins/winrt/qwinrtabstractvideorenderercontrol.cpp @@ -44,6 +44,7 @@ #include <QtCore/qfunctions_winrt.h> #include <QtCore/QGlobalStatic> #include <QtCore/QMetaMethod> +#include <QtCore/QPointer> #include <QtGui/QOpenGLContext> #include <QtGui/QOpenGLTexture> #include <QtMultimedia/QAbstractVideoBuffer> @@ -181,7 +182,7 @@ enum DirtyState { class QWinRTAbstractVideoRendererControlPrivate { public: - QAbstractVideoSurface *surface; + QPointer<QAbstractVideoSurface> 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() |