]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
gstreamer1.0-plugins-good: fix build with gcc11
authorAndreas Müller <schnitzeltony@gmail.com>
Sat, 8 May 2021 12:14:37 +0000 (14:14 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 9 May 2021 22:30:10 +0000 (23:30 +0100)
This fixes issues when qt plugins are enabled (which is not by default
without additional layers).

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0003-Remove-volatile-from-static-vars-to-fix-build-with-g.patch [new file with mode: 0644]
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.4.bb

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0003-Remove-volatile-from-static-vars-to-fix-build-with-g.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0003-Remove-volatile-from-static-vars-to-fix-build-with-g.patch
new file mode 100644 (file)
index 0000000..8722382
--- /dev/null
@@ -0,0 +1,100 @@
+From 07572920319ea86cebb6dd073ab65915ec207eed Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Sat, 8 May 2021 14:08:41 +0200
+Subject: [PATCH] Remove volatile from static vars to fix build with gcc11
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Stolen from [1]
+
+[1] https://src.fedoraproject.org/rpms/gstreamer1-plugins-good/blob/rawhide/f/gstreamer1-plugins-good-gcc11.patch
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ ext/qt/gstqsgtexture.cc  | 2 +-
+ ext/qt/gstqtglutility.cc | 2 +-
+ ext/qt/qtglrenderer.cc   | 2 +-
+ ext/qt/qtitem.cc         | 2 +-
+ ext/qt/qtwindow.cc       | 4 ++--
+ 5 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc
+index 4cc9fc6..50c8d7f 100644
+--- a/ext/qt/gstqsgtexture.cc
++++ b/ext/qt/gstqsgtexture.cc
+@@ -35,7 +35,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+ GstQSGTexture::GstQSGTexture ()
+ {
+-  static volatile gsize _debug;
++  static gsize _debug;
+   initializeOpenGLFunctions();
+diff --git a/ext/qt/gstqtglutility.cc b/ext/qt/gstqtglutility.cc
+index acb89b6..d2c0922 100644
+--- a/ext/qt/gstqtglutility.cc
++++ b/ext/qt/gstqtglutility.cc
+@@ -66,7 +66,7 @@ gst_qt_get_gl_display ()
+ {
+   GstGLDisplay *display = NULL;
+   QGuiApplication *app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
+-  static volatile gsize _debug;
++  static gsize _debug;
+   g_assert (app != NULL);
+diff --git a/ext/qt/qtglrenderer.cc b/ext/qt/qtglrenderer.cc
+index 2ad5601..bffba8f 100644
+--- a/ext/qt/qtglrenderer.cc
++++ b/ext/qt/qtglrenderer.cc
+@@ -22,7 +22,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+ static void
+ init_debug (void)
+ {
+-  static volatile gsize _debug;
++  static gsize _debug;
+   if (g_once_init_enter (&_debug)) {
+     GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglrenderer", 0,
+diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc
+index 7659800..bc99639 100644
+--- a/ext/qt/qtitem.cc
++++ b/ext/qt/qtitem.cc
+@@ -104,7 +104,7 @@ void InitializeSceneGraph::run()
+ QtGLVideoItem::QtGLVideoItem()
+ {
+-  static volatile gsize _debug;
++  static gsize _debug;
+   if (g_once_init_enter (&_debug)) {
+     GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglwidget", 0, "Qt GL Widget");
+diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc
+index 0dfd3f1..f1bd4ae 100644
+--- a/ext/qt/qtwindow.cc
++++ b/ext/qt/qtwindow.cc
+@@ -103,7 +103,7 @@ QtGLWindow::QtGLWindow ( QWindow * parent, QQuickWindow *src ) :
+   QQuickWindow( parent ), source (src)
+ {
+   QGuiApplication *app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
+-  static volatile gsize _debug;
++  static gsize _debug;
+   g_assert (app != NULL);
+@@ -152,7 +152,7 @@ QtGLWindow::beforeRendering()
+   g_mutex_lock (&this->priv->lock);
+-  static volatile gsize once = 0;
++  static gsize once = 0;
+   if (g_once_init_enter(&once)) {
+     this->priv->start = QDateTime::currentDateTime().toMSecsSinceEpoch();
+     g_once_init_leave(&once,1);
+-- 
+2.30.2
+
index 07cacdc68accff3eab1007d0544cd2d25d3dacc3..c7d31d206d65472f05c9b3d2b5e645dfde5f6382 100644 (file)
@@ -7,6 +7,7 @@ BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues
 SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
            file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \
            file://0002-rtpjitterbuffer-Fix-parsing-of-the-mediaclk-direct-f.patch \
+           file://0003-Remove-volatile-from-static-vars-to-fix-build-with-g.patch \
            "
 
 SRC_URI[sha256sum] = "b6e50e3a9bbcd56ee6ec71c33aa8332cc9c926b0c1fae995aac8b3040ebe39b0"