qtglrenderer.cc: Fix compiling
authorRaul Tambre <raul@tambre.ee>
Fri, 15 May 2020 16:20:45 +0000 (19:20 +0300)
committerRaul Tambre <raul@tambre.ee>
Fri, 15 May 2020 16:20:45 +0000 (19:20 +0300)
46bfb7d247aef880c15300dad63eb2bbf6dc4928 fixed a format warning without checking if it actually compiled.
toUtf8() returns QByteArray so we need to assign it to a temporary variable to be able to get the raw string data from it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/593>

ext/qt/qtglrenderer.cc

index 365c06b..ddd8acf 100644 (file)
@@ -628,7 +628,7 @@ void GstQuickRenderer::initializeGstGL ()
      * 2. QAnimationDriver controls the 'animation time' that the Qml scene is
      *    rendered at
      */
-    /* FIXME: what happens with multiple qmlgloverlay elements?  Do we need a 
+    /* FIXME: what happens with multiple qmlgloverlay elements?  Do we need a
      * shared animation driver? */
     g_mutex_lock (&m_sharedRenderData->lock);
     if (m_sharedRenderData->m_animationDriver == nullptr) {
@@ -720,8 +720,9 @@ bool GstQuickRenderer::setQmlScene (const gchar * scene, GError ** error)
         initializeQml();
 
     if (m_errorString != "") {
+        QByteArray string = m_errorString.toUtf8();
         g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_SETTINGS,
-            "%s", m_errorString.toUtf8());
+            "%s", string.constData());
         return FALSE;
     }