Android: fix calling start() and stop() on the video surface.

We restart the surface when the frame size changes, though we were
not using the correct function to get the surface's current frame size.
This was causing start() and stop() to be called for every frame.

Change-Id: I8ff4b4852cb7fcc92ac3b1b3ad7bf991d7bddc6b
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
This commit is contained in:
Yoann Lopes
2014-05-19 12:48:59 +02:00
committed by The Qt Project
parent 7e668fe58f
commit 92096afdb4

View File

@@ -267,7 +267,7 @@ void QAndroidVideoRendererControl::onFrameAvailable()
QVideoFrame frame(buffer, m_nativeSize, QVideoFrame::Format_BGR32);
if (m_surface->isActive() && (m_surface->surfaceFormat().pixelFormat() != frame.pixelFormat()
|| m_surface->nativeResolution() != frame.size())) {
|| m_surface->surfaceFormat().frameSize() != frame.size())) {
m_surface->stop();
}