diff options
author | Wouter Huysentruit <wouter_huysentruit@hotmail.com> | 2014-03-03 20:21:26 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-06 08:31:41 +0100 |
commit | 42e032bdc11fbd6cc87e27df6e8359c5882bfe23 (patch) | |
tree | 5d5614d0fe042b6073d27d44684401d282f7d769 /src | |
parent | 5b52c1ebb9b949d74aeb9a089718045f137800d4 (diff) | |
download | qtmultimedia-42e032bdc11fbd6cc87e27df6e8359c5882bfe23.tar.gz qtmultimedia-42e032bdc11fbd6cc87e27df6e8359c5882bfe23.tar.bz2 qtmultimedia-42e032bdc11fbd6cc87e27df6e8359c5882bfe23.zip |
Release videoframe on painter stop()
QVideoSurfaceGLPainter/QVideoSurfaceGlslPainter needs
to release the video frame on stop (just like
QVideoSurfaceGenericPainter already does).
Change-Id: Iaf3eb13eaf51fbc22fab6b1f80db8e8978ac328d
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/multimediawidgets/qpaintervideosurface.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp index 87757914..e1dccb2b 100644 --- a/src/multimediawidgets/qpaintervideosurface.cpp +++ b/src/multimediawidgets/qpaintervideosurface.cpp @@ -247,6 +247,8 @@ public: bool isFormatSupported(const QVideoSurfaceFormat &format) const; + void stop(); + QAbstractVideoSurface::Error setCurrentFrame(const QVideoFrame &frame); QAbstractVideoSurface::Error paint( @@ -351,6 +353,12 @@ bool QVideoSurfaceGLPainter::isFormatSupported(const QVideoSurfaceFormat &format return false; } + +void QVideoSurfaceGLPainter::stop() +{ + m_frame = QVideoFrame(); +} + QAbstractVideoSurface::Error QVideoSurfaceGLPainter::setCurrentFrame(const QVideoFrame &frame) { m_frame = frame; @@ -832,6 +840,8 @@ void QVideoSurfaceArbFpPainter::stop() m_textureCount = 0; m_programId = 0; m_handleType = QAbstractVideoBuffer::NoHandle; + + QVideoSurfaceGLPainter::stop(); } QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::paint( @@ -1176,6 +1186,8 @@ void QVideoSurfaceGlslPainter::stop() m_textureCount = 0; m_handleType = QAbstractVideoBuffer::NoHandle; + + QVideoSurfaceGLPainter::stop(); } QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::paint( |