Ensure the backend has had its geometry updated.
authorRoger Maclean <rmaclean@qnx.com>
Fri, 31 Jan 2014 19:58:54 +0000 (14:58 -0500)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 3 Feb 2014 17:43:41 +0000 (18:43 +0100)
When trying to play video in an overlay window, the video fails to
be displayed because everything that would cause updateGeometry to be
called on the backend has already occurred prior to the backend having
been created.

Change-Id: Ida3c8feea69b497a18e9f44d7143bed03380d6ae
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
src/qtmultimediaquicktools/qdeclarativevideooutput.cpp

index 321fd5e..a04b38c 100644 (file)
@@ -247,7 +247,10 @@ bool QDeclarativeVideoOutput::createBackend(QMediaService *service)
     if (!backendAvailable) {
         qWarning() << Q_FUNC_INFO << "Media service has neither renderer nor window control available.";
         m_backend.reset();
+    } else if (!m_geometryDirty) {
+        m_backend->updateGeometry();
     }
+
     return backendAvailable;
 }