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>
This commit is contained in:
Yoann Lopes
2016-04-01 15:11:40 +02:00
committed by Yoann Lopes
parent a4656b06eb
commit d76d3184b7

View File

@@ -284,6 +284,10 @@ void QAndroidTextureVideoOutput::stop()
void QAndroidTextureVideoOutput::reset() void QAndroidTextureVideoOutput::reset()
{ {
// flush pending frame
if (m_surface)
m_surface->present(QVideoFrame());
clearSurfaceTexture(); clearSurfaceTexture();
} }