diff options
author | Val Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-07-11 14:35:47 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-07-18 11:59:13 +0200 |
commit | d9dd7f4896cbc0fe1dc37e517c28315419e6ffcd (patch) | |
tree | 6e73d11d19b950f5a211414cbb6e0fbe510692db /src/qtmultimediaquicktools/qdeclarativevideooutput.cpp | |
parent | 073d3ea91c4c3f3fe7227e7335d35fc53dc630b3 (diff) |
VideoOutput: Update geometry only when the surface is active
Since starting the surface could be done after updating the geometry of
VideoOutput element (paint event is received),
and this leads setting invalid geometry to renderer and never updates by correct one.
Because the geometry is not "dirty" anymore, means already set.
Need just to update geometry when (or keep trying before) the surface is already started with
proper video surface format.
Change-Id: I338d7fe355c20f2027c6231241714376e9b569b2
Fixes: QTBUG-76205
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/qtmultimediaquicktools/qdeclarativevideooutput.cpp')
-rw-r--r-- | src/qtmultimediaquicktools/qdeclarativevideooutput.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp index 3c6a6f9c5..5430063fe 100644 --- a/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp +++ b/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp @@ -411,8 +411,13 @@ void QDeclarativeVideoOutput::_q_updateGeometry() m_contentRect.moveCenter(rect.center()); } - if (m_backend) - m_backend->updateGeometry(); + if (m_backend) { + if (!m_backend->videoSurface() || m_backend->videoSurface()->isActive()) + m_backend->updateGeometry(); + else + m_geometryDirty = true; + } + if (m_contentRect != oldContentRect) emit contentRectChanged(); |