#include <QtCore/qfunctions_winrt.h>
#include <QtCore/QGlobalStatic>
#include <QtCore/QMetaMethod>
+#include <QtCore/QPointer>
#include <QtGui/QOpenGLContext>
#include <QtGui/QOpenGLTexture>
#include <QtMultimedia/QAbstractVideoBuffer>
class QWinRTAbstractVideoRendererControlPrivate
{
public:
- QAbstractVideoSurface *surface;
+ QPointer<QAbstractVideoSurface> surface;
QVideoSurfaceFormat format;
DirtyState dirtyState;
{
Q_D(QWinRTAbstractVideoRendererControl);
- d->surface = Q_NULLPTR;
d->format = QVideoSurfaceFormat(size, QVideoFrame::Format_BGRA32,
QAbstractVideoBuffer::GLTextureHandle);
d->dirtyState = TextureDirty;
}
d->renderThread.requestInterruption();
+ if (d->surface && d->surface->isActive())
+ d->surface->stop();
}
void QWinRTAbstractVideoRendererControl::present()