summaryrefslogtreecommitdiffstats
path: root/src/plugins/android/src/common
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2016-04-01 15:11:40 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-06-03 09:44:10 +0000
commitd76d3184b7407b0ff6d4d8d614a5679736d4aa15 (patch)
tree7b0a24d390234c8920f958d206c5e98e11b3ed79 /src/plugins/android/src/common
parenta4656b06ebaa031666ccd2f29c2426647db534e2 (diff)
Android: flush the current video frame when the video output is reset.
The texture renderer could end up in a situation where a frame could be scheduled to be rendered after the renderer was reset. Change-Id: Ie6b6c9d0b5f5851f14aa6eb5f8421196aff8c691 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src/plugins/android/src/common')
-rw-r--r--src/plugins/android/src/common/qandroidvideooutput.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/android/src/common/qandroidvideooutput.cpp b/src/plugins/android/src/common/qandroidvideooutput.cpp
index c0bd88d85..f69be679a 100644
--- a/src/plugins/android/src/common/qandroidvideooutput.cpp
+++ b/src/plugins/android/src/common/qandroidvideooutput.cpp
@@ -284,6 +284,10 @@ void QAndroidTextureVideoOutput::stop()
void QAndroidTextureVideoOutput::reset()
{
+ // flush pending frame
+ if (m_surface)
+ m_surface->present(QVideoFrame());
+
clearSurfaceTexture();
}