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
This commit is contained in:
Scott D Phillips 2016-11-14 11:27:05 -08:00 committed by Sebastian Dröge
parent 1e30725331
commit 075744a894
4 changed files with 9 additions and 8 deletions

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}