diff options
author | Matthew Waters <matthew@centricular.com> | 2021-03-22 14:34:36 +1100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2021-03-22 14:34:36 +1100 |
commit | 640a65bf966df065d41a511e2d76d1f26a2e770c (patch) | |
tree | fd3e65091ef2518a9455edacb4536f6fff515fdb /gst/rtmp2 | |
parent | e22befad2ed3a411e73aa03f2b014ada9d953b5c (diff) | |
download | gstreamer-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>
Diffstat (limited to 'gst/rtmp2')
-rw-r--r-- | gst/rtmp2/rtmp/amf.c | 2 | ||||
-rw-r--r-- | gst/rtmp2/rtmp/rtmpchunkstream.c | 2 | ||||
-rw-r--r-- | gst/rtmp2/rtmp/rtmpclient.c | 8 | ||||
-rw-r--r-- | gst/rtmp2/rtmp/rtmphandshake.c | 2 | ||||
-rw-r--r-- | gst/rtmp2/rtmp/rtmpmessage.c | 2 |
5 files changed, 8 insertions, 8 deletions
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 }; |