summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2021-03-22 14:34:36 +1100
committerMatthew Waters <matthew@centricular.com>2021-03-22 14:34:36 +1100
commit640a65bf966df065d41a511e2d76d1f26a2e770c (patch)
treefd3e65091ef2518a9455edacb4536f6fff515fdb
parente22befad2ed3a411e73aa03f2b014ada9d953b5c (diff)
downloadgstreamer-plugins-bad-640a65bf966df065d41a511e2d76d1f26a2e770c.tar.gz
gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics should be used instead. GCC 11 has started warning about using volatile with atomic operations. https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719 Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2098>
-rw-r--r--ext/closedcaption/gstccconverter.c2
-rw-r--r--ext/colormanagement/gstlcms.c4
-rw-r--r--ext/curl/gstcurlqueue.h2
-rw-r--r--ext/iqa/iqa.c2
-rw-r--r--ext/opencv/gstcvdilateerode.cpp2
-rw-r--r--ext/openjpeg/gstopenjpegenc.c2
-rw-r--r--ext/resindvd/rsndec.c2
-rw-r--r--ext/sctp/sctpassociation.c2
-rw-r--r--ext/ttml/subtitlemeta.c2
-rw-r--r--ext/wildmidi/gstwildmididec.c2
-rw-r--r--gst-libs/gst/adaptivedemux/gstadaptivedemux.c6
-rw-r--r--gst-libs/gst/audio/gstnonstreamaudiodecoder.c2
-rw-r--r--gst-libs/gst/codecparsers/gstmpegvideometa.c2
-rw-r--r--gst-libs/gst/d3d11/gstd3d11device.c4
-rw-r--r--gst-libs/gst/d3d11/gstd3d11utils.c2
-rw-r--r--gst-libs/gst/sctp/sctpreceivemeta.c2
-rw-r--r--gst-libs/gst/sctp/sctpsendmeta.c2
-rw-r--r--gst-libs/gst/vulkan/android/gstvkwindow_android.c2
-rw-r--r--gst-libs/gst/vulkan/cocoa/gstvkwindow_cocoa.m2
-rw-r--r--gst-libs/gst/vulkan/gstvkbuffermemory.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkcommandbuffer.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkdescriptorset.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkdevice.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkdisplay.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkfence.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkhandle.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkimagememory.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkimageview.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkinstance.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkmemory.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkphysicaldevice.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkqueue.c2
-rw-r--r--gst-libs/gst/vulkan/gstvktrash.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkutils.c2
-rw-r--r--gst-libs/gst/vulkan/gstvkwindow.c2
-rw-r--r--gst-libs/gst/vulkan/ios/gstvkwindow_ios.m2
-rw-r--r--gst-libs/gst/vulkan/vulkan_mkenum.py4
-rw-r--r--gst-libs/gst/vulkan/wayland/gstvkwindow_wayland.c2
-rw-r--r--gst-libs/gst/vulkan/xcb/gstvkwindow_xcb.c2
-rw-r--r--gst/camerabin2/gstcamerabin2.c2
-rw-r--r--gst/debugutils/gstfakevideosink.c2
-rw-r--r--gst/mxf/mxfmetadata.c2
-rw-r--r--gst/netsim/gstnetsim.c8
-rw-r--r--gst/rtmp2/rtmp/amf.c2
-rw-r--r--gst/rtmp2/rtmp/rtmpchunkstream.c2
-rw-r--r--gst/rtmp2/rtmp/rtmpclient.c8
-rw-r--r--gst/rtmp2/rtmp/rtmphandshake.c2
-rw-r--r--gst/rtmp2/rtmp/rtmpmessage.c2
-rw-r--r--gst/segmentclip/gstsegmentclip.c2
-rw-r--r--sys/androidmedia/gstamcaudiodec.c2
-rw-r--r--sys/androidmedia/gstamcvideodec.c2
-rw-r--r--sys/androidmedia/gstamcvideoenc.c2
-rw-r--r--sys/applemedia/coremediabuffer.c2
-rw-r--r--sys/applemedia/corevideobuffer.c2
-rw-r--r--sys/applemedia/corevideomemory.c2
-rw-r--r--sys/applemedia/iosglmemory.c2
-rw-r--r--sys/applemedia/iosurfaceglmemory.c2
-rw-r--r--sys/applemedia/iosurfacevulkanmemory.c2
-rw-r--r--sys/bluez/gstavdtpsrc.h2
-rw-r--r--sys/d3d11/gstd3d11deinterlace.cpp2
-rw-r--r--sys/d3d11/gstd3d11shader.cpp2
-rw-r--r--sys/d3d11/gstd3d11window.cpp2
-rw-r--r--sys/d3d11/gstd3d11window_win32.cpp2
-rw-r--r--sys/ipcpipeline/gstipcpipelinecomm.c2
-rw-r--r--sys/mediafoundation/gstmftransform.cpp4
-rw-r--r--sys/mediafoundation/gstmfvideobuffer.h4
-rw-r--r--sys/msdk/gstmsdkcontextutil.c2
-rw-r--r--sys/nvcodec/gstcudacontext.c2
-rw-r--r--sys/nvcodec/gstcudanvrtc.c2
-rw-r--r--sys/nvcodec/gstcudautils.c4
-rw-r--r--sys/nvcodec/gstnvbaseenc.h2
-rw-r--r--sys/opensles/openslescommon.c4
-rw-r--r--sys/va/gstvaallocator.c8
-rw-r--r--sys/va/gstvautils.c2
-rw-r--r--sys/wasapi/gstwasapiutil.c2
-rw-r--r--sys/wasapi2/gstwasapi2client.cpp2
-rw-r--r--sys/winscreencap/dxgicapture.c2
-rw-r--r--tests/check/libs/vkimage.c4
78 files changed, 97 insertions, 97 deletions
diff --git a/ext/closedcaption/gstccconverter.c b/ext/closedcaption/gstccconverter.c
index fe6aadd4c..e1c060016 100644
--- a/ext/closedcaption/gstccconverter.c
+++ b/ext/closedcaption/gstccconverter.c
@@ -85,7 +85,7 @@ gst_cc_converter_cdp_mode_get_type (void)
"Store CC service information in CDP packets", "cc-svc-info"},
{0, NULL, NULL}
};
- static volatile GType id = 0;
+ static GType id = 0;
if (g_once_init_enter ((gsize *) & id)) {
GType _id;
diff --git a/ext/colormanagement/gstlcms.c b/ext/colormanagement/gstlcms.c
index ebcc4438b..84f694bf0 100644
--- a/ext/colormanagement/gstlcms.c
+++ b/ext/colormanagement/gstlcms.c
@@ -67,7 +67,7 @@ enum
GType
gst_lcms_intent_get_type (void)
{
- static volatile gsize intent_type = 0;
+ static gsize intent_type = 0;
static const GEnumValue intent[] = {
{GST_LCMS_INTENT_PERCEPTUAL, "Perceptual",
"perceptual"},
@@ -90,7 +90,7 @@ gst_lcms_intent_get_type (void)
static GType
gst_lcms_lookup_method_get_type (void)
{
- static volatile gsize lookup_method_type = 0;
+ static gsize lookup_method_type = 0;
static const GEnumValue lookup_method[] = {
{GST_LCMS_LOOKUP_METHOD_UNCACHED,
"Uncached, calculate every pixel on the fly (very slow playback)",
diff --git a/ext/curl/gstcurlqueue.h b/ext/curl/gstcurlqueue.h
index e43359a58..eea1d9610 100644
--- a/ext/curl/gstcurlqueue.h
+++ b/ext/curl/gstcurlqueue.h
@@ -51,7 +51,7 @@
struct _GstCurlHttpSrcQueueElement
{
GstCurlHttpSrc *p;
- volatile gint running;
+ gint running;
GstCurlHttpSrcQueueElement *next;
};
diff --git a/ext/iqa/iqa.c b/ext/iqa/iqa.c
index c27bcd9f5..7cc45b88c 100644
--- a/ext/iqa/iqa.c
+++ b/ext/iqa/iqa.c
@@ -159,7 +159,7 @@ gst_iqa_mode_flags_get_type (void)
{GST_IQA_MODE_STRICT, "Strict comparison of frames.", "strict"},
{0, NULL, NULL}
};
- static volatile GType id = 0;
+ static GType id = 0;
if (g_once_init_enter ((gsize *) & id)) {
GType _id;
diff --git a/ext/opencv/gstcvdilateerode.cpp b/ext/opencv/gstcvdilateerode.cpp
index 77a7ec459..ad4d2ad88 100644
--- a/ext/opencv/gstcvdilateerode.cpp
+++ b/ext/opencv/gstcvdilateerode.cpp
@@ -87,7 +87,7 @@ static void gst_cv_dilate_erode_get_property (GObject * object, guint prop_id,
GType
gst_cv_dilate_erode_get_type (void)
{
- static volatile gsize opencv_dilate_erode_type = 0;
+ static gsize opencv_dilate_erode_type = 0;
if (g_once_init_enter (&opencv_dilate_erode_type)) {
GType _type;
diff --git a/ext/openjpeg/gstopenjpegenc.c b/ext/openjpeg/gstopenjpegenc.c
index 250129bbd..a758834dd 100644
--- a/ext/openjpeg/gstopenjpegenc.c
+++ b/ext/openjpeg/gstopenjpegenc.c
@@ -45,7 +45,7 @@ gst_openjpeg_enc_progression_order_get_type (void)
{OPJ_CPRL, "CPRL", "crpl"},
{0, NULL, NULL}
};
- static volatile GType id = 0;
+ static GType id = 0;
if (g_once_init_enter ((gsize *) & id)) {
GType _id;
diff --git a/ext/resindvd/rsndec.c b/ext/resindvd/rsndec.c
index 4f4b2680f..bb747757f 100644
--- a/ext/resindvd/rsndec.c
+++ b/ext/resindvd/rsndec.c
@@ -346,7 +346,7 @@ rsn_dec_change_state (GstElement * element, GstStateChange transition)
GType
rsn_dec_get_type (void)
{
- static volatile gsize type = 0;
+ static gsize type = 0;
if (g_once_init_enter (&type)) {
GType _type;
diff --git a/ext/sctp/sctpassociation.c b/ext/sctp/sctpassociation.c
index dd98eb176..fbf5b4afe 100644
--- a/ext/sctp/sctpassociation.c
+++ b/ext/sctp/sctpassociation.c
@@ -56,7 +56,7 @@ gst_sctp_association_state_get_type (void)
{GST_SCTP_ASSOCIATION_STATE_ERROR, "state-error", "state-error"},
{0, NULL, NULL}
};
- static volatile GType id = 0;
+ static GType id = 0;
if (g_once_init_enter ((gsize *) & id)) {
GType _id;
diff --git a/ext/ttml/subtitlemeta.c b/ext/ttml/subtitlemeta.c
index cdbfcce24..3ce569f6e 100644
--- a/ext/ttml/subtitlemeta.c
+++ b/ext/ttml/subtitlemeta.c
@@ -32,7 +32,7 @@
GType
gst_subtitle_meta_api_get_type (void)
{
- static volatile GType type;
+ static GType type;
static const gchar *tags[] = { "memory", NULL };
if (g_once_init_enter (&type)) {
diff --git a/ext/wildmidi/gstwildmididec.c b/ext/wildmidi/gstwildmididec.c
index d628c0fe6..b90488bd2 100644
--- a/ext/wildmidi/gstwildmididec.c
+++ b/ext/wildmidi/gstwildmididec.c
@@ -151,7 +151,7 @@ static void gst_wildmidi_dec_update_options (GstWildmidiDec * wildmidi_dec);
static GMutex load_mutex;
static unsigned long init_refcount = 0;
-static volatile gint wildmidi_initialized = 0;
+static gint wildmidi_initialized = 0;
static gchar *
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
index e32444eaa..a495ec2e7 100644
--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
+++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
@@ -211,7 +211,7 @@ struct _GstAdaptiveDemuxPrivate
typedef struct _GstAdaptiveDemuxTimer
{
- volatile gint ref_count;
+ gint ref_count;
GCond *cond;
GMutex *mutex;
GstClockID clock_id;
@@ -312,7 +312,7 @@ gst_adaptive_demux_requires_periodical_playlist_update_default (GstAdaptiveDemux
GType
gst_adaptive_demux_get_type (void)
{
- static volatile gsize type = 0;
+ static gsize type = 0;
if (g_once_init_enter (&type)) {
GType _type;
@@ -4577,7 +4577,7 @@ gst_adaptive_demux_timer_new (GCond * cond, GMutex * mutex)
timer->fired = FALSE;
timer->cond = cond;
timer->mutex = mutex;
- timer->ref_count = 1;
+ g_atomic_int_set (&timer->ref_count, 1);
return timer;
}
diff --git a/gst-libs/gst/audio/gstnonstreamaudiodecoder.c b/gst-libs/gst/audio/gstnonstreamaudiodecoder.c
index ca8afce6a..f98ddb014 100644
--- a/gst-libs/gst/audio/gstnonstreamaudiodecoder.c
+++ b/gst-libs/gst/audio/gstnonstreamaudiodecoder.c
@@ -339,7 +339,7 @@ gst_nonstream_audio_decoder_subsong_mode_get_type (void)
GType
gst_nonstream_audio_decoder_get_type (void)
{
- static volatile gsize nonstream_audio_decoder_type = 0;
+ static gsize nonstream_audio_decoder_type = 0;
if (g_once_init_enter (&nonstream_audio_decoder_type)) {
GType type_;
diff --git a/gst-libs/gst/codecparsers/gstmpegvideometa.c b/gst-libs/gst/codecparsers/gstmpegvideometa.c
index 4b9a71bac..bce5c67d6 100644
--- a/gst-libs/gst/codecparsers/gstmpegvideometa.c
+++ b/gst-libs/gst/codecparsers/gstmpegvideometa.c
@@ -96,7 +96,7 @@ gst_mpeg_video_meta_transform (GstBuffer * dest, GstMeta * meta,
GType
gst_mpeg_video_meta_api_get_type (void)
{
- static volatile GType type;
+ static GType type;
static const gchar *tags[] = { "memory", NULL }; /* don't know what to set here */
if (g_once_init_enter (&type)) {
diff --git a/gst-libs/gst/d3d11/gstd3d11device.c b/gst-libs/gst/d3d11/gstd3d11device.c
index fd40ead5e..94f966710 100644
--- a/gst-libs/gst/d3d11/gstd3d11device.c
+++ b/gst-libs/gst/d3d11/gstd3d11device.c
@@ -150,7 +150,7 @@ static void gst_d3d11_device_finalize (GObject * object);
static gboolean
gst_d3d11_device_enable_d3d11_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
/* If all below libraries are unavailable, d3d11 device would fail with
* D3D11_CREATE_DEVICE_DEBUG flag */
@@ -245,7 +245,7 @@ gst_d3d11_device_d3d11_debug (GstD3D11Device * device,
static gboolean
gst_d3d11_device_enable_dxgi_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
gboolean ret = FALSE;
/* If all below libraries are unavailable, d3d11 device would fail with
diff --git a/gst-libs/gst/d3d11/gstd3d11utils.c b/gst-libs/gst/d3d11/gstd3d11utils.c
index f188d5483..2680b65fe 100644
--- a/gst-libs/gst/d3d11/gstd3d11utils.c
+++ b/gst-libs/gst/d3d11/gstd3d11utils.c
@@ -54,7 +54,7 @@ ensure_debug_category (void)
static void
_init_context_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_GET (GST_CAT_CONTEXT, "GST_CONTEXT");
diff --git a/gst-libs/gst/sctp/sctpreceivemeta.c b/gst-libs/gst/sctp/sctpreceivemeta.c
index e1c77d466..11def6523 100644
--- a/gst-libs/gst/sctp/sctpreceivemeta.c
+++ b/gst-libs/gst/sctp/sctpreceivemeta.c
@@ -37,7 +37,7 @@ GType
gst_sctp_receive_meta_api_get_type (void)
{
static const gchar *tags[] = { NULL };
- static volatile GType type;
+ static GType type;
if (g_once_init_enter (&type)) {
GType _type = gst_meta_api_type_register ("GstSctpReceiveMetaAPI", tags);
g_once_init_leave (&type, _type);
diff --git a/gst-libs/gst/sctp/sctpsendmeta.c b/gst-libs/gst/sctp/sctpsendmeta.c
index d8ce14fc9..e29cd7d92 100644
--- a/gst-libs/gst/sctp/sctpsendmeta.c
+++ b/gst-libs/gst/sctp/sctpsendmeta.c
@@ -37,7 +37,7 @@ GType
gst_sctp_send_meta_api_get_type (void)
{
static const gchar *tags[] = { NULL };
- static volatile GType type;
+ static GType type;
if (g_once_init_enter (&type)) {
GType _type = gst_meta_api_type_register ("GstSctpSendMetaAPI", tags);
g_once_init_leave (&type, _type);
diff --git a/gst-libs/gst/vulkan/android/gstvkwindow_android.c b/gst-libs/gst/vulkan/android/gstvkwindow_android.c
index c1bd866ac..a745d54ce 100644
--- a/gst-libs/gst/vulkan/android/gstvkwindow_android.c
+++ b/gst-libs/gst/vulkan/android/gstvkwindow_android.c
@@ -37,7 +37,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static void
_init_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkanwindowandroid", 0,
diff --git a/gst-libs/gst/vulkan/cocoa/gstvkwindow_cocoa.m b/gst-libs/gst/vulkan/cocoa/gstvkwindow_cocoa.m
index f00726267..fd8e22742 100644
--- a/gst-libs/gst/vulkan/cocoa/gstvkwindow_cocoa.m
+++ b/gst-libs/gst/vulkan/cocoa/gstvkwindow_cocoa.m
@@ -42,7 +42,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static void
_init_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkanwindowmacos", 0,
diff --git a/gst-libs/gst/vulkan/gstvkbuffermemory.c b/gst-libs/gst/vulkan/gstvkbuffermemory.c
index 967ef9d27..515aff0d0 100644
--- a/gst-libs/gst/vulkan/gstvkbuffermemory.c
+++ b/gst-libs/gst/vulkan/gstvkbuffermemory.c
@@ -363,7 +363,7 @@ gst_vulkan_buffer_memory_allocator_init (GstVulkanBufferMemoryAllocator *
void
gst_vulkan_buffer_memory_init_once (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_VULKAN_BUFFER_MEMORY, "vulkanbuffermemory",
diff --git a/gst-libs/gst/vulkan/gstvkcommandbuffer.c b/gst-libs/gst/vulkan/gstvkcommandbuffer.c
index 2719ba3e3..7b0d310da 100644
--- a/gst-libs/gst/vulkan/gstvkcommandbuffer.c
+++ b/gst-libs/gst/vulkan/gstvkcommandbuffer.c
@@ -41,7 +41,7 @@ GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
static void
init_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkancommandbuffer", 0,
diff --git a/gst-libs/gst/vulkan/gstvkdescriptorset.c b/gst-libs/gst/vulkan/gstvkdescriptorset.c
index ad2280d20..1718382d8 100644
--- a/gst-libs/gst/vulkan/gstvkdescriptorset.c
+++ b/gst-libs/gst/vulkan/gstvkdescriptorset.c
@@ -44,7 +44,7 @@ GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
static void
init_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkandescriptorset", 0,
diff --git a/gst-libs/gst/vulkan/gstvkdevice.c b/gst-libs/gst/vulkan/gstvkdevice.c
index e5f57d10c..639406de0 100644
--- a/gst-libs/gst/vulkan/gstvkdevice.c
+++ b/gst-libs/gst/vulkan/gstvkdevice.c
@@ -67,7 +67,7 @@ struct _GstVulkanDevicePrivate
static void
_init_debug (void)
{
- static volatile gsize init;
+ static gsize init;
if (g_once_init_enter (&init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkandevice", 0,
diff --git a/gst-libs/gst/vulkan/gstvkdisplay.c b/gst-libs/gst/vulkan/gstvkdisplay.c
index 345234985..fc87417b6 100644
--- a/gst-libs/gst/vulkan/gstvkdisplay.c
+++ b/gst-libs/gst/vulkan/gstvkdisplay.c
@@ -59,7 +59,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static void
_init_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkandisplay", 0,
diff --git a/gst-libs/gst/vulkan/gstvkfence.c b/gst-libs/gst/vulkan/gstvkfence.c
index cdfcefe0a..9e03a24b5 100644
--- a/gst-libs/gst/vulkan/gstvkfence.c
+++ b/gst-libs/gst/vulkan/gstvkfence.c
@@ -42,7 +42,7 @@ GST_DEBUG_CATEGORY (gst_debug_vulkan_fence);
static void
_init_debug (void)
{
- static volatile gsize init;
+ static gsize init;
if (g_once_init_enter (&init)) {
GST_DEBUG_CATEGORY_INIT (gst_debug_vulkan_fence,
diff --git a/gst-libs/gst/vulkan/gstvkhandle.c b/gst-libs/gst/vulkan/gstvkhandle.c
index 454f84546..8219030d4 100644
--- a/gst-libs/gst/vulkan/gstvkhandle.c
+++ b/gst-libs/gst/vulkan/gstvkhandle.c
@@ -40,7 +40,7 @@ GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
static void
init_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkanhandle", 0,
diff --git a/gst-libs/gst/vulkan/gstvkimagememory.c b/gst-libs/gst/vulkan/gstvkimagememory.c
index 8a0328433..7a242496e 100644
--- a/gst-libs/gst/vulkan/gstvkimagememory.c
+++ b/gst-libs/gst/vulkan/gstvkimagememory.c
@@ -705,7 +705,7 @@ gst_vulkan_image_memory_allocator_init (GstVulkanImageMemoryAllocator *
void
gst_vulkan_image_memory_init_once (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_VULKAN_IMAGE_MEMORY, "vulkanimagememory",
diff --git a/gst-libs/gst/vulkan/gstvkimageview.c b/gst-libs/gst/vulkan/gstvkimageview.c
index 655a77865..c8f86bad9 100644
--- a/gst-libs/gst/vulkan/gstvkimageview.c
+++ b/gst-libs/gst/vulkan/gstvkimageview.c
@@ -40,7 +40,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFUALT);
static void
init_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_VULKAN_IMAGE_VIEW, "vulkanimageview",
diff --git a/gst-libs/gst/vulkan/gstvkinstance.c b/gst-libs/gst/vulkan/gstvkinstance.c
index 0dbf26f9c..14db32922 100644
--- a/gst-libs/gst/vulkan/gstvkinstance.c
+++ b/gst-libs/gst/vulkan/gstvkinstance.c
@@ -96,7 +96,7 @@ struct _GstVulkanInstancePrivate
static void
_init_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkaninstance", 0,
diff --git a/gst-libs/gst/vulkan/gstvkmemory.c b/gst-libs/gst/vulkan/gstvkmemory.c
index f70333258..40ed31e8f 100644
--- a/gst-libs/gst/vulkan/gstvkmemory.c
+++ b/gst-libs/gst/vulkan/gstvkmemory.c
@@ -309,7 +309,7 @@ gst_vulkan_memory_allocator_init (GstVulkanMemoryAllocator * allocator)
void
gst_vulkan_memory_init_once (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_VULKAN_MEMORY, "vulkanmemory", 0,
diff --git a/gst-libs/gst/vulkan/gstvkphysicaldevice.c b/gst-libs/gst/vulkan/gstvkphysicaldevice.c
index cf9be303b..33f9f2055 100644
--- a/gst-libs/gst/vulkan/gstvkphysicaldevice.c
+++ b/gst-libs/gst/vulkan/gstvkphysicaldevice.c
@@ -71,7 +71,7 @@ struct _GstVulkanPhysicalDevicePrivate
static void
_init_debug (void)
{
- static volatile gsize init;
+ static gsize init;
if (g_once_init_enter (&init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkandevice", 0,
diff --git a/gst-libs/gst/vulkan/gstvkqueue.c b/gst-libs/gst/vulkan/gstvkqueue.c
index 0763b83d6..025b9b235 100644
--- a/gst-libs/gst/vulkan/gstvkqueue.c
+++ b/gst-libs/gst/vulkan/gstvkqueue.c
@@ -40,7 +40,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_CONTEXT);
static void
_init_debug (void)
{
- static volatile gsize init;
+ static gsize init;
if (g_once_init_enter (&init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkanqueue", 0, "Vulkan Queue");
diff --git a/gst-libs/gst/vulkan/gstvktrash.c b/gst-libs/gst/vulkan/gstvktrash.c
index 56c12bafe..a5c38ccaa 100644
--- a/gst-libs/gst/vulkan/gstvktrash.c
+++ b/gst-libs/gst/vulkan/gstvktrash.c
@@ -44,7 +44,7 @@ GST_DEBUG_CATEGORY (gst_debug_vulkan_trash);
static void
_init_debug (void)
{
- static volatile gsize init;
+ static gsize init;
if (g_once_init_enter (&init)) {
GST_DEBUG_CATEGORY_INIT (gst_debug_vulkan_trash,
diff --git a/gst-libs/gst/vulkan/gstvkutils.c b/gst-libs/gst/vulkan/gstvkutils.c
index 2971d0cc2..5646b5a3f 100644
--- a/gst-libs/gst/vulkan/gstvkutils.c
+++ b/gst-libs/gst/vulkan/gstvkutils.c
@@ -37,7 +37,7 @@ static void
_init_context_debug (void)
{
#ifndef GST_DISABLE_GST_DEBUG
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_GET (GST_CAT_CONTEXT, "GST_CONTEXT");
diff --git a/gst-libs/gst/vulkan/gstvkwindow.c b/gst-libs/gst/vulkan/gstvkwindow.c
index bcccfe514..ed5a784c9 100644
--- a/gst-libs/gst/vulkan/gstvkwindow.c
+++ b/gst-libs/gst/vulkan/gstvkwindow.c
@@ -138,7 +138,7 @@ gst_vulkan_window_default_close (GstVulkanWindow * window)
static void
_init_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkanwindow", 0,
diff --git a/gst-libs/gst/vulkan/ios/gstvkwindow_ios.m b/gst-libs/gst/vulkan/ios/gstvkwindow_ios.m
index 84fc33deb..db23e77ae 100644
--- a/gst-libs/gst/vulkan/ios/gstvkwindow_ios.m
+++ b/gst-libs/gst/vulkan/ios/gstvkwindow_ios.m
@@ -41,7 +41,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static void
_init_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkanwindowios", 0,
diff --git a/gst-libs/gst/vulkan/vulkan_mkenum.py b/gst-libs/gst/vulkan/vulkan_mkenum.py
index 0d1ecfe09..59a6bbc3e 100644
--- a/gst-libs/gst/vulkan/vulkan_mkenum.py
+++ b/gst-libs/gst/vulkan/vulkan_mkenum.py
@@ -22,11 +22,11 @@ c_array = ['--fhead',
'--fprod',
"\n/* enumerations from \"@basename@\" */",
'--vhead',
- "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {",
+ "GType\n@enum_name@_get_type (void)\n{\n static gsize static_g_define_type_id = 0;\n if (g_once_init_enter (&static_g_define_type_id)) {\n static const G@Type@Value values[] = {",
'--vprod',
" { C_@TYPE@ (@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" },",
'--vtail',
- " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n"
+ " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&static_g_define_type_id, g_define_type_id);\n }\n return static_g_define_type_id;\n}\n"
]
cmd = []
diff --git a/gst-libs/gst/vulkan/wayland/gstvkwindow_wayland.c b/gst-libs/gst/vulkan/wayland/gstvkwindow_wayland.c
index eda063de9..5d3f5c48d 100644
--- a/gst-libs/gst/vulkan/wayland/gstvkwindow_wayland.c
+++ b/gst-libs/gst/vulkan/wayland/gstvkwindow_wayland.c
@@ -37,7 +37,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static void
_init_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkanwindowxcb", 0,
diff --git a/gst-libs/gst/vulkan/xcb/gstvkwindow_xcb.c b/gst-libs/gst/vulkan/xcb/gstvkwindow_xcb.c
index b0f1ab4d0..285943b12 100644
--- a/gst-libs/gst/vulkan/xcb/gstvkwindow_xcb.c
+++ b/gst-libs/gst/vulkan/xcb/gstvkwindow_xcb.c
@@ -39,7 +39,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static void
_init_debug (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "vulkanwindowxcb", 0,
diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c
index 584e3e316..502ed736d 100644
--- a/gst/camerabin2/gstcamerabin2.c
+++ b/gst/camerabin2/gstcamerabin2.c
@@ -263,7 +263,7 @@ gst_cam_flags_get_type (void)
"elements", "no-image-conversion"},
{0, NULL, NULL}
};
- static volatile GType id = 0;
+ static GType id = 0;
if (g_once_init_enter ((gsize *) & id)) {
GType _id;
diff --git a/gst/debugutils/gstfakevideosink.c b/gst/debugutils/gstfakevideosink.c
index 3ebc9a360..ddb2ae1a0 100644
--- a/gst/debugutils/gstfakevideosink.c
+++ b/gst/debugutils/gstfakevideosink.c
@@ -54,7 +54,7 @@ gst_fake_video_sink_allocation_meta_flags_get_type (void)
"overlay-composition"},
{0, NULL, NULL}
};
- static volatile GType id = 0;
+ static GType id = 0;
if (g_once_init_enter ((gsize *) & id)) {
GType _id;
diff --git a/gst/mxf/mxfmetadata.c b/gst/mxf/mxfmetadata.c
index 2860b6847..c8d34060d 100644
--- a/gst/mxf/mxfmetadata.c
+++ b/gst/mxf/mxfmetadata.c
@@ -6581,7 +6581,7 @@ mxf_descriptive_metadata_new (guint8 scheme, guint32 type,
GType
mxf_descriptive_metadata_framework_get_type (void)
{
- static volatile gsize type = 0;
+ static gsize type = 0;
if (g_once_init_enter (&type)) {
GType _type = 0;
static const GTypeInfo info = {
diff --git a/gst/netsim/gstnetsim.c b/gst/netsim/gstnetsim.c
index e0771b83e..692b3893d 100644
--- a/gst/netsim/gstnetsim.c
+++ b/gst/netsim/gstnetsim.c
@@ -38,8 +38,8 @@ GST_DEBUG_CATEGORY (netsim_debug);
static GType
distribution_get_type (void)
{
- static volatile gsize g_define_type_id__volatile = 0;
- if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static gsize static_g_define_type_id = 0;
+ if (g_once_init_enter (&static_g_define_type_id)) {
static const GEnumValue values[] = {
{DISTRIBUTION_UNIFORM, "uniform", "uniform"},
{DISTRIBUTION_NORMAL, "normal", "normal"},
@@ -48,9 +48,9 @@ distribution_get_type (void)
};
GType g_define_type_id =
g_enum_register_static ("GstNetSimDistribution", values);
- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ g_once_init_leave (&static_g_define_type_id, g_define_type_id);
}
- return g_define_type_id__volatile;
+ return static_g_define_type_id;
}
enum
diff --git a/gst/rtmp2/rtmp/amf.c b/gst/rtmp2/rtmp/amf.c
index 69c376803..f103b91c5 100644
--- a/gst/rtmp2/rtmp/amf.c
+++ b/gst/rtmp2/rtmp/amf.c
@@ -38,7 +38,7 @@ static GBytes *empty_bytes;
static void
init_static (void)
{
- static volatile gsize done = 0;
+ static gsize done = 0;
if (g_once_init_enter (&done)) {
empty_bytes = g_bytes_new_static ("", 0);
GST_DEBUG_CATEGORY_INIT (gst_rtmp_amf_debug_category, "rtmpamf", 0,
diff --git a/gst/rtmp2/rtmp/rtmpchunkstream.c b/gst/rtmp2/rtmp/rtmpchunkstream.c
index 1cdd68b26..d3471e76b 100644
--- a/gst/rtmp2/rtmp/rtmpchunkstream.c
+++ b/gst/rtmp2/rtmp/rtmpchunkstream.c
@@ -31,7 +31,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_rtmp_chunk_stream_debug_category);
static void
init_debug (void)
{
- static volatile gsize done = 0;
+ static gsize done = 0;
if (g_once_init_enter (&done)) {
GST_DEBUG_CATEGORY_INIT (gst_rtmp_chunk_stream_debug_category,
"rtmpchunkstream", 0, "debug category for rtmp chunk streams");
diff --git a/gst/rtmp2/rtmp/rtmpclient.c b/gst/rtmp2/rtmp/rtmpclient.c
index d2746ef74..5a4ffcc81 100644
--- a/gst/rtmp2/rtmp/rtmpclient.c
+++ b/gst/rtmp2/rtmp/rtmpclient.c
@@ -44,7 +44,7 @@ static void on_publish_or_play_status (const gchar * command_name,
static void
init_debug (void)
{
- static volatile gsize done = 0;
+ static gsize done = 0;
if (g_once_init_enter (&done)) {
GST_DEBUG_CATEGORY_INIT (gst_rtmp_client_debug_category,
"rtmpclient", 0, "debug category for the rtmp client");
@@ -66,7 +66,7 @@ static const gchar *scheme_strings[] = {
GType
gst_rtmp_scheme_get_type (void)
{
- static volatile gsize scheme_type = 0;
+ static gsize scheme_type = 0;
static const GEnumValue scheme[] = {
{GST_RTMP_SCHEME_RTMP, "GST_RTMP_SCHEME_RTMP", "rtmp"},
{GST_RTMP_SCHEME_RTMPS, "GST_RTMP_SCHEME_RTMPS", "rtmps"},
@@ -142,7 +142,7 @@ gst_rtmp_scheme_get_default_port (GstRtmpScheme scheme)
GType
gst_rtmp_authmod_get_type (void)
{
- static volatile gsize authmod_type = 0;
+ static gsize authmod_type = 0;
static const GEnumValue authmod[] = {
{GST_RTMP_AUTHMOD_NONE, "GST_RTMP_AUTHMOD_NONE", "none"},
{GST_RTMP_AUTHMOD_AUTO, "GST_RTMP_AUTHMOD_AUTO", "auto"},
@@ -169,7 +169,7 @@ gst_rtmp_authmod_get_nick (GstRtmpAuthmod value)
GType
gst_rtmp_stop_commands_get_type (void)
{
- static volatile gsize stop_commands_type = 0;
+ static gsize stop_commands_type = 0;
static const GFlagsValue stop_commands[] = {
{GST_RTMP_STOP_COMMANDS_NONE, "No command", "none"},
{GST_RTMP_STOP_COMMANDS_FCUNPUBLISH, "FCUnpublish", "fcunpublish"},
diff --git a/gst/rtmp2/rtmp/rtmphandshake.c b/gst/rtmp2/rtmp/rtmphandshake.c
index 0d821c3d8..10d0b3698 100644
--- a/gst/rtmp2/rtmp/rtmphandshake.c
+++ b/gst/rtmp2/rtmp/rtmphandshake.c
@@ -34,7 +34,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_rtmp_handshake_debug_category);
static void
init_debug (void)
{
- static volatile gsize done = 0;
+ static gsize done = 0;
if (g_once_init_enter (&done)) {
GST_DEBUG_CATEGORY_INIT (gst_rtmp_handshake_debug_category, "rtmphandshake",
0, "debug category for the rtmp connection handshake");
diff --git a/gst/rtmp2/rtmp/rtmpmessage.c b/gst/rtmp2/rtmp/rtmpmessage.c
index 9a7d1bcca..95225e68f 100644
--- a/gst/rtmp2/rtmp/rtmpmessage.c
+++ b/gst/rtmp2/rtmp/rtmpmessage.c
@@ -146,7 +146,7 @@ gst_rtmp_user_control_type_get_nick (GstRtmpUserControlType type)
GType
gst_rtmp_meta_api_get_type (void)
{
- static volatile GType type = 0;
+ static GType type = 0;
static const gchar *tags[] = {
NULL
};
diff --git a/gst/segmentclip/gstsegmentclip.c b/gst/segmentclip/gstsegmentclip.c
index 6d002b24f..167bac4bf 100644
--- a/gst/segmentclip/gstsegmentclip.c
+++ b/gst/segmentclip/gstsegmentclip.c
@@ -56,7 +56,7 @@ static GstElementClass *parent_class;
GType
gst_segment_clip_get_type (void)
{
- static volatile gsize segment_clip_type = 0;
+ static gsize segment_clip_type = 0;
if (g_once_init_enter (&segment_clip_type)) {
GType _type;
diff --git a/sys/androidmedia/gstamcaudiodec.c b/sys/androidmedia/gstamcaudiodec.c
index 63253e09f..2c4344130 100644
--- a/sys/androidmedia/gstamcaudiodec.c
+++ b/sys/androidmedia/gstamcaudiodec.c
@@ -90,7 +90,7 @@ static GstAudioDecoderClass *parent_class = NULL;
GType
gst_amc_audio_dec_get_type (void)
{
- static volatile gsize type = 0;
+ static gsize type = 0;
if (g_once_init_enter (&type)) {
GType _type;
diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c
index 79c2f20f8..79670bd6d 100644
--- a/sys/androidmedia/gstamcvideodec.c
+++ b/sys/androidmedia/gstamcvideodec.c
@@ -263,7 +263,7 @@ static GstVideoDecoderClass *parent_class = NULL;
GType
gst_amc_video_dec_get_type (void)
{
- static volatile gsize type = 0;
+ static gsize type = 0;
if (g_once_init_enter (&type)) {
GType _type;
diff --git a/sys/androidmedia/gstamcvideoenc.c b/sys/androidmedia/gstamcvideoenc.c
index 8725520c9..591ca35de 100644
--- a/sys/androidmedia/gstamcvideoenc.c
+++ b/sys/androidmedia/gstamcvideoenc.c
@@ -114,7 +114,7 @@ static GstVideoEncoderClass *parent_class = NULL;
GType
gst_amc_video_enc_get_type (void)
{
- static volatile gsize type = 0;
+ static gsize type = 0;
if (g_once_init_enter (&type)) {
GType _type;
diff --git a/sys/applemedia/coremediabuffer.c b/sys/applemedia/coremediabuffer.c
index 8f573be39..70877d77f 100644
--- a/sys/applemedia/coremediabuffer.c
+++ b/sys/applemedia/coremediabuffer.c
@@ -93,7 +93,7 @@ gst_core_media_meta_transform (GstBuffer * transbuf, GstCoreMediaMeta * meta,
GType
gst_core_media_meta_api_get_type (void)
{
- static volatile GType type;
+ static GType type;
static const gchar *tags[] = { "memory", NULL };
if (g_once_init_enter (&type)) {
diff --git a/sys/applemedia/corevideobuffer.c b/sys/applemedia/corevideobuffer.c
index 63d737c13..f41685c04 100644
--- a/sys/applemedia/corevideobuffer.c
+++ b/sys/applemedia/corevideobuffer.c
@@ -80,7 +80,7 @@ gst_core_video_meta_transform (GstBuffer * transbuf, GstCoreVideoMeta * meta,
GType
gst_core_video_meta_api_get_type (void)
{
- static volatile GType type;
+ static GType type;
static const gchar *tags[] = { "memory", NULL };
if (g_once_init_enter (&type)) {
diff --git a/sys/applemedia/corevideomemory.c b/sys/applemedia/corevideomemory.c
index 5e832d474..f072d339c 100644
--- a/sys/applemedia/corevideomemory.c
+++ b/sys/applemedia/corevideomemory.c
@@ -261,7 +261,7 @@ static GstAppleCoreVideoAllocator *_apple_core_video_allocator;
void
gst_apple_core_video_memory_init (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_APPLE_CORE_VIDEO_MEMORY, "corevideomemory",
diff --git a/sys/applemedia/iosglmemory.c b/sys/applemedia/iosglmemory.c
index f677efa4c..7272f1b1f 100644
--- a/sys/applemedia/iosglmemory.c
+++ b/sys/applemedia/iosglmemory.c
@@ -105,7 +105,7 @@ gst_ios_gl_memory_allocator_init (GstIOSGLMemoryAllocator * allocator)
void
gst_ios_gl_memory_init (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_IOS_GL_MEMORY, "iosurface", 0,
diff --git a/sys/applemedia/iosurfaceglmemory.c b/sys/applemedia/iosurfaceglmemory.c
index 56e5bad03..d37e6e223 100644
--- a/sys/applemedia/iosurfaceglmemory.c
+++ b/sys/applemedia/iosurfaceglmemory.c
@@ -141,7 +141,7 @@ gst_io_surface_gl_memory_allocator_init (GstIOSurfaceGLMemoryAllocator *
void
gst_ios_surface_gl_memory_init (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_IO_SURFACE_GL_MEMORY, "iosurfacegl", 0,
diff --git a/sys/applemedia/iosurfacevulkanmemory.c b/sys/applemedia/iosurfacevulkanmemory.c
index b237cfb55..2bf2e5da7 100644
--- a/sys/applemedia/iosurfacevulkanmemory.c
+++ b/sys/applemedia/iosurfacevulkanmemory.c
@@ -114,7 +114,7 @@ gst_io_surface_vulkan_memory_allocator_init (GstIOSurfaceVulkanMemoryAllocator *
void
gst_io_surface_vulkan_memory_init (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (GST_CAT_IO_SURFACE_VULKAN_MEMORY,
diff --git a/sys/bluez/gstavdtpsrc.h b/sys/bluez/gstavdtpsrc.h
index 34a2697f2..57e26493f 100644
--- a/sys/bluez/gstavdtpsrc.h
+++ b/sys/bluez/gstavdtpsrc.h
@@ -59,7 +59,7 @@ struct _GstAvdtpSrc
GstPoll *poll;
GstPollFD pfd;
- volatile gint unlocked;
+ gint unlocked;
GstClockTime duration;
diff --git a/sys/d3d11/gstd3d11deinterlace.cpp b/sys/d3d11/gstd3d11deinterlace.cpp
index 7c1ddd0e9..2ddd49068 100644
--- a/sys/d3d11/gstd3d11deinterlace.cpp
+++ b/sys/d3d11/gstd3d11deinterlace.cpp
@@ -126,7 +126,7 @@ typedef enum
static GType
gst_d3d11_deinterlace_method_type (void)
{
- static volatile gsize method_type = 0;
+ static gsize method_type = 0;
if (g_once_init_enter (&method_type)) {
static const GFlagsValue method_types[] = {
diff --git a/sys/d3d11/gstd3d11shader.cpp b/sys/d3d11/gstd3d11shader.cpp
index 9b7e4cf0d..8596b6a9b 100644
--- a/sys/d3d11/gstd3d11shader.cpp
+++ b/sys/d3d11/gstd3d11shader.cpp
@@ -43,7 +43,7 @@ static pD3DCompile GstD3DCompileFunc = NULL;
gboolean
gst_d3d11_shader_init (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
#if GST_D3D11_WINAPI_ONLY_APP
diff --git a/sys/d3d11/gstd3d11window.cpp b/sys/d3d11/gstd3d11window.cpp
index cf7479f70..537c7c281 100644
--- a/sys/d3d11/gstd3d11window.cpp
+++ b/sys/d3d11/gstd3d11window.cpp
@@ -97,7 +97,7 @@ static guint d3d11_window_signals[SIGNAL_LAST] = { 0, };
GType
gst_d3d11_window_fullscreen_toggle_mode_type (void)
{
- static volatile gsize mode_type = 0;
+ static gsize mode_type = 0;
if (g_once_init_enter (&mode_type)) {
static const GFlagsValue mode_types[] = {
diff --git a/sys/d3d11/gstd3d11window_win32.cpp b/sys/d3d11/gstd3d11window_win32.cpp
index ef014658f..91b30e602 100644
--- a/sys/d3d11/gstd3d11window_win32.cpp
+++ b/sys/d3d11/gstd3d11window_win32.cpp
@@ -81,7 +81,7 @@ struct _GstD3D11WindowWin32
gboolean have_swapchain1;
/* atomic */
- volatile gint pending_fullscreen_count;
+ gint pending_fullscreen_count;
/* fullscreen related */
RECT restore_rect;
diff --git a/sys/ipcpipeline/gstipcpipelinecomm.c b/sys/ipcpipeline/gstipcpipelinecomm.c
index 9176f4962..3dde66004 100644
--- a/sys/ipcpipeline/gstipcpipelinecomm.c
+++ b/sys/ipcpipeline/gstipcpipelinecomm.c
@@ -2318,7 +2318,7 @@ G_STMT_START { \
void
gst_ipc_pipeline_comm_plugin_init (void)
{
- static volatile gsize once = 0;
+ static gsize once = 0;
if (g_once_init_enter (&once)) {
GST_DEBUG_CATEGORY_INIT (gst_ipc_pipeline_comm_debug, "ipcpipelinecomm", 0,
diff --git a/sys/mediafoundation/gstmftransform.cpp b/sys/mediafoundation/gstmftransform.cpp
index 10b0c2f5a..08ee58927 100644
--- a/sys/mediafoundation/gstmftransform.cpp
+++ b/sys/mediafoundation/gstmftransform.cpp
@@ -54,7 +54,7 @@ gboolean
gst_mf_transform_load_library (void)
{
#if GST_MF_HAVE_D3D11
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
mf_plat_module = g_module_open ("mfplat.dll", G_MODULE_BIND_LAZY);
@@ -247,7 +247,7 @@ private:
}
private:
- volatile ULONG ref_count_;
+ ULONG ref_count_;
ComPtr<IMFMediaEventGenerator> gen_;
GstMFTransformAsyncCallbackOnEvent event_cb_;
GWeakRef client_;
diff --git a/sys/mediafoundation/gstmfvideobuffer.h b/sys/mediafoundation/gstmfvideobuffer.h
index a12b12a84..2dc422206 100644
--- a/sys/mediafoundation/gstmfvideobuffer.h
+++ b/sys/mediafoundation/gstmfvideobuffer.h
@@ -100,7 +100,7 @@ private:
DWORD length);
private:
- volatile ULONG ref_count_;
+ ULONG ref_count_;
DWORD current_len_;
DWORD contiguous_len_;
BYTE *data_;
@@ -116,4 +116,4 @@ private:
GDestroyNotify notify_;
};
-#endif /* __GST_MF_VIDEO_BUFFER_H__ */ \ No newline at end of file
+#endif /* __GST_MF_VIDEO_BUFFER_H__ */
diff --git a/sys/msdk/gstmsdkcontextutil.c b/sys/msdk/gstmsdkcontextutil.c
index 6f5c7e41d..0cd24eb4b 100644
--- a/sys/msdk/gstmsdkcontextutil.c
+++ b/sys/msdk/gstmsdkcontextutil.c
@@ -38,7 +38,7 @@ static void
_init_context_debug (void)
{
#ifndef GST_DISABLE_GST_DEBUG
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_GET (GST_CAT_CONTEXT, "GST_CONTEXT");
diff --git a/sys/nvcodec/gstcudacontext.c b/sys/nvcodec/gstcudacontext.c
index ff1b350c9..8a85d5d2e 100644
--- a/sys/nvcodec/gstcudacontext.c
+++ b/sys/nvcodec/gstcudacontext.c
@@ -134,7 +134,7 @@ gst_cuda_context_get_property (GObject * object, guint prop_id,
static void
gst_cuda_context_constructed (GObject * object)
{
- static volatile gsize once = 0;
+ static gsize once = 0;
GstCudaContext *context = GST_CUDA_CONTEXT (object);
GstCudaContextPrivate *priv = context->priv;
CUcontext cuda_ctx, old_ctx;
diff --git a/sys/nvcodec/gstcudanvrtc.c b/sys/nvcodec/gstcudanvrtc.c
index 39c15be7e..381c69870 100644
--- a/sys/nvcodec/gstcudanvrtc.c
+++ b/sys/nvcodec/gstcudanvrtc.c
@@ -29,7 +29,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_cuda_nvrtc_debug);
static void
_init_debug (void)
{
- static volatile gsize once_init = 0;
+ static gsize once_init = 0;
if (g_once_init_enter (&once_init)) {
diff --git a/sys/nvcodec/gstcudautils.c b/sys/nvcodec/gstcudautils.c
index 052590209..6d33bc484 100644
--- a/sys/nvcodec/gstcudautils.c
+++ b/sys/nvcodec/gstcudautils.c
@@ -36,7 +36,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_CONTEXT);
static void
_init_debug (void)
{
- static volatile gsize once_init = 0;
+ static gsize once_init = 0;
if (g_once_init_enter (&once_init)) {
@@ -354,7 +354,7 @@ static GQuark gst_cuda_quark_table[GST_CUDA_QUARK_MAX];
static void
init_cuda_quark_once (void)
{
- static volatile gsize once_init = 0;
+ static gsize once_init = 0;
if (g_once_init_enter (&once_init)) {
gint i;
diff --git a/sys/nvcodec/gstnvbaseenc.h b/sys/nvcodec/gstnvbaseenc.h
index 26e240b7b..743db78cd 100644
--- a/sys/nvcodec/gstnvbaseenc.h
+++ b/sys/nvcodec/gstnvbaseenc.h
@@ -119,7 +119,7 @@ typedef struct {
GValue * input_formats; /* OBJECT LOCK */
GstVideoCodecState *input_state;
- volatile gint reconfig; /* ATOMIC */
+ gint reconfig; /* ATOMIC */
GstNvEncMemType mem_type;
/* array of allocated input/output buffers (GstNvEncFrameState),
diff --git a/sys/opensles/openslescommon.c b/sys/opensles/openslescommon.c
index 7dc4bb81f..72cfc9d5d 100644
--- a/sys/opensles/openslescommon.c
+++ b/sys/opensles/openslescommon.c
@@ -42,7 +42,7 @@ gst_opensles_recording_preset_get_type (void)
"voice-communication"},
{0, NULL, NULL}
};
- static volatile GType id = 0;
+ static GType id = 0;
if (g_once_init_enter ((gsize *) & id)) {
GType _id;
@@ -100,7 +100,7 @@ gst_opensles_stream_type_get_type (void)
"GST_OPENSLES_STREAM_TYPE_NONE", "none"},
{0, NULL, NULL}
};
- static volatile GType id = 0;
+ static GType id = 0;
if (g_once_init_enter ((gsize *) & id)) {
GType _id;
diff --git a/sys/va/gstvaallocator.c b/sys/va/gstvaallocator.c
index 6138e2e7a..b1136fe4a 100644
--- a/sys/va/gstvaallocator.c
+++ b/sys/va/gstvaallocator.c
@@ -38,7 +38,7 @@ static void
_init_debug_category (void)
{
#ifndef GST_DISABLE_GST_DEBUG
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_INIT (gst_va_memory_debug, "vamemory", 0, "VA memory");
@@ -342,8 +342,8 @@ struct _GstVaBufferSurface
VASurfaceID surface;
guint n_mems;
GstMemory *mems[GST_VIDEO_MAX_PLANES];
- volatile gint ref_count;
- volatile gint ref_mems_count;
+ gint ref_count;
+ gint ref_mems_count;
};
static void
@@ -1029,7 +1029,7 @@ struct _GstVaMemory
gpointer mapped_data;
GstMapFlags prev_mapflags;
- volatile gint map_count;
+ gint map_count;
gboolean is_derived;
gboolean is_dirty;
diff --git a/sys/va/gstvautils.c b/sys/va/gstvautils.c
index 36068fb0a..6014f321a 100644
--- a/sys/va/gstvautils.c
+++ b/sys/va/gstvautils.c
@@ -32,7 +32,7 @@ static void
_init_context_debug (void)
{
#ifndef GST_DISABLE_GST_DEBUG
- static volatile gsize _init = 0;
+ static gsize _init = 0;
if (g_once_init_enter (&_init)) {
GST_DEBUG_CATEGORY_GET (GST_CAT_CONTEXT, "GST_CONTEXT");
diff --git a/sys/wasapi/gstwasapiutil.c b/sys/wasapi/gstwasapiutil.c
index 61076df84..5d7ff38c4 100644
--- a/sys/wasapi/gstwasapiutil.c
+++ b/sys/wasapi/gstwasapiutil.c
@@ -144,7 +144,7 @@ gst_wasapi_device_role_get_type (void)
{GST_WASAPI_DEVICE_ROLE_COMMS, "Voice communications", "comms"},
{0, NULL, NULL}
};
- static volatile GType id = 0;
+ static GType id = 0;
if (g_once_init_enter ((gsize *) & id)) {
GType _id;
diff --git a/sys/wasapi2/gstwasapi2client.cpp b/sys/wasapi2/gstwasapi2client.cpp
index ac4b482ef..1e7640f7b 100644
--- a/sys/wasapi2/gstwasapi2client.cpp
+++ b/sys/wasapi2/gstwasapi2client.cpp
@@ -277,7 +277,7 @@ struct _GstWasapi2Client
GType
gst_wasapi2_client_device_class_get_type (void)
{
- static volatile GType class_type = 0;
+ static GType class_type = 0;
static const GEnumValue types[] = {
{GST_WASAPI2_CLIENT_DEVICE_CLASS_CAPTURE, "Capture", "capture"},
{GST_WASAPI2_CLIENT_DEVICE_CLASS_RENDER, "Render", "render"},
diff --git a/sys/winscreencap/dxgicapture.c b/sys/winscreencap/dxgicapture.c
index 07c30dc70..4b17e5e89 100644
--- a/sys/winscreencap/dxgicapture.c
+++ b/sys/winscreencap/dxgicapture.c
@@ -166,7 +166,7 @@ static pD3DCompile GstD3DCompileFunc = NULL;
gboolean
gst_dxgicap_shader_init (void)
{
- static volatile gsize _init = 0;
+ static gsize _init = 0;
static const gchar *d3d_compiler_names[] = {
"d3dcompiler_47.dll",
"d3dcompiler_46.dll",
diff --git a/tests/check/libs/vkimage.c b/tests/check/libs/vkimage.c
index 09999b739..6ef279b09 100644
--- a/tests/check/libs/vkimage.c
+++ b/tests/check/libs/vkimage.c
@@ -149,7 +149,7 @@ struct view_stress
GMutex lock;
GCond cond;
gboolean ready;
- volatile int n_ops;
+ int n_ops;
GQueue *memories;
GstHarnessThread *threads[N_THREADS];
};
@@ -189,7 +189,7 @@ GST_START_TEST (test_image_view_stress)
g_mutex_init (&stress.lock);
g_cond_init (&stress.cond);
stress.ready = FALSE;
- stress.n_ops = 0;
+ g_atomic_int_set (&stress.n_ops, 0);
stress.memories = g_queue_new ();
gst_video_info_set_format (&v_info, GST_VIDEO_FORMAT_RGBA, 16, 16);