Commit 075744a8 authored by Scott D Phillips's avatar Scott D Phillips Committed by Sebastian Dröge
Browse files

Cast away const from GstMetaInfo in *_get_meta_info() functions

MSVC warns about the const in the implicit argument conversion in the
calls to g_once_init_{enter,leave}. It's OK so explicitly cast it.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
parent 1e307253
......@@ -2481,7 +2481,7 @@ gst_parent_buffer_meta_get_info (void)
{
static const GstMetaInfo *meta_info = NULL;
if (g_once_init_enter (&meta_info)) {
if (g_once_init_enter ((GstMetaInfo **) & meta_info)) {
const GstMetaInfo *meta =
gst_meta_register (gst_parent_buffer_meta_api_get_type (),
"GstParentBufferMeta",
......@@ -2489,7 +2489,7 @@ gst_parent_buffer_meta_get_info (void)
(GstMetaInitFunction) _gst_parent_buffer_meta_init,
(GstMetaFreeFunction) _gst_parent_buffer_meta_free,
_gst_parent_buffer_meta_transform);
g_once_init_leave (&meta_info, meta);
g_once_init_leave ((GstMetaInfo **) & meta_info, (GstMetaInfo *) meta);
}
return meta_info;
......
......@@ -111,13 +111,14 @@ gst_protection_meta_get_info (void)
{
static const GstMetaInfo *protection_meta_info = NULL;
if (g_once_init_enter (&protection_meta_info)) {
if (g_once_init_enter ((GstMetaInfo **) & protection_meta_info)) {
const GstMetaInfo *meta =
gst_meta_register (GST_PROTECTION_META_API_TYPE, "GstProtectionMeta",
sizeof (GstProtectionMeta), gst_protection_meta_init,
gst_protection_meta_free, gst_protection_meta_transform);
g_once_init_leave (&protection_meta_info, meta);
g_once_init_leave ((GstMetaInfo **) & protection_meta_info,
(GstMetaInfo *) meta);
}
return protection_meta_info;
}
......
......@@ -83,13 +83,13 @@ gst_net_address_meta_get_info (void)
{
static const GstMetaInfo *meta_info = NULL;
if (g_once_init_enter (&meta_info)) {
if (g_once_init_enter ((GstMetaInfo **) & meta_info)) {
const GstMetaInfo *mi = gst_meta_register (GST_NET_ADDRESS_META_API_TYPE,
"GstNetAddressMeta",
sizeof (GstNetAddressMeta),
net_address_meta_init,
net_address_meta_free, net_address_meta_transform);
g_once_init_leave (&meta_info, mi);
g_once_init_leave ((GstMetaInfo **) & meta_info, (GstMetaInfo *) mi);
}
return meta_info;
}
......
......@@ -87,7 +87,7 @@ gst_net_control_message_meta_get_info (void)
{
static const GstMetaInfo *meta_info = NULL;
if (g_once_init_enter (&meta_info)) {
if (g_once_init_enter ((GstMetaInfo **) & meta_info)) {
const GstMetaInfo *mi =
gst_meta_register (GST_NET_CONTROL_MESSAGE_META_API_TYPE,
"GstNetControlMessageMeta",
......@@ -95,7 +95,7 @@ gst_net_control_message_meta_get_info (void)
net_control_message_meta_init,
net_control_message_meta_free,
net_control_message_meta_transform);
g_once_init_leave (&meta_info, mi);
g_once_init_leave ((GstMetaInfo **) & meta_info, (GstMetaInfo *) mi);
}
return meta_info;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment