summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0003-Remove-volatile-from-static-vars-to-fix-build-with-g.patch
blob: 87223826c6115ee285ecf954d805917433cb49a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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