summaryrefslogtreecommitdiff
path: root/ext/openh264
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2015-04-07 11:09:38 +0200
committerEdward Hervey <bilboed@bilboed.com>2015-04-07 11:24:30 +0200
commitf31127b9ffde79f5467cdb4af2e517b366e0f7d2 (patch)
tree20b1c585086d3d649afa17115fba92579f0d6810 /ext/openh264
parent29387e85c74d2821b1ef18430e5bf5983047f64f (diff)
downloadgstreamer-plugins-bad-f31127b9ffde79f5467cdb4af2e517b366e0f7d2.tar.gz
open264: Fix GType/gsize usage
gstopenh264enc.cpp:108:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
Diffstat (limited to 'ext/openh264')
-rw-r--r--ext/openh264/gstopenh264enc.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/openh264/gstopenh264enc.cpp b/ext/openh264/gstopenh264enc.cpp
index 4b84cc328..094cf4ca9 100644
--- a/ext/openh264/gstopenh264enc.cpp
+++ b/ext/openh264/gstopenh264enc.cpp
@@ -104,14 +104,14 @@ gst_openh264enc_deblocking_mode_get_type (void)
"Deblocking on, except for slice boundaries", "not-slice-boundaries"},
{0, NULL, NULL},
};
- static volatile GType id = 0;
+ static gsize id = 0;
- if (g_once_init_enter ((gsize *) & id)) {
+ if (g_once_init_enter (& id)) {
GType _id = g_enum_register_static ("GstOpenh264encDeblockingModes", types);
- g_once_init_leave ((gsize *) & id, _id);
+ g_once_init_leave (& id, _id);
}
- return id;
+ return (GType) id;
}
#define GST_TYPE_OPENH264ENC_SLICE_MODE (gst_openh264enc_slice_mode_get_type ())
@@ -123,14 +123,14 @@ gst_openh264enc_slice_mode_get_type (void)
{SM_AUTO_SLICE, "Number of slices equal to number of threads", "auto"},
{0, NULL, NULL},
};
- static volatile GType id = 0;
+ static gsize id = 0;
- if (g_once_init_enter ((gsize *) & id)) {
+ if (g_once_init_enter (& id)) {
GType _id = g_enum_register_static ("GstOpenh264encSliceModes", types);
- g_once_init_leave ((gsize *) & id, _id);
+ g_once_init_leave (& id, _id);
}
- return id;
+ return (GType) id;
}
/* prototypes */