summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapiencoder.c
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2021-03-19 17:42:36 +1100
committerMatthew Waters <matthew@centricular.com>2021-03-19 19:03:54 +1100
commitd270654c48c19afc3234e126269bf613540b44d8 (patch)
tree6c6dbe776b96f162d6dfe950504c84926c9e89ca /gst-libs/gst/vaapi/gstvaapiencoder.c
parente1f6c37b46997a8244690b4c85d7f7fcd5307373 (diff)
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/gstreamer-vaapi/-/merge_requests/418>
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapiencoder.c')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.c b/gst-libs/gst/vaapi/gstvaapiencoder.c
index 83d26f0f..6c103ace 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder.c
@@ -1822,7 +1822,7 @@ out:
GType
gst_vaapi_encoder_tune_get_type (void)
{
- static volatile gsize g_type = 0;
+ static gsize g_type = 0;
static const GEnumValue encoder_tune_values[] = {
/* *INDENT-OFF* */
@@ -1850,7 +1850,7 @@ gst_vaapi_encoder_tune_get_type (void)
GType
gst_vaapi_encoder_mbbrc_get_type (void)
{
- static volatile gsize g_type = 0;
+ static gsize g_type = 0;
if (g_once_init_enter (&g_type)) {
static const GEnumValue encoder_mbbrc_values[] = {