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:
committed by
The Qt Project
parent
7e668fe58f
commit
92096afdb4
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user