video-anc: init type before g_once_init_enter
authorStéphane Cerveau <scerveau@collabora.com>
Fri, 8 May 2020 09:19:24 +0000 (11:19 +0200)
committerStéphane Cerveau <scerveau@collabora.com>
Wed, 27 May 2020 15:13:35 +0000 (17:13 +0200)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/675>

gst-libs/gst/video/video-anc.c

index 4b0a105..fbded45 100644 (file)
@@ -932,7 +932,7 @@ gst_video_vbi_encoder_write_line (GstVideoVBIEncoder * encoder, guint8 * data)
 GType
 gst_video_caption_meta_api_get_type (void)
 {
-  static volatile GType type;
+  static volatile GType type = 0;
 
   if (g_once_init_enter (&type)) {
     static const gchar *tags[] = { NULL };
@@ -1135,7 +1135,7 @@ gst_video_caption_type_to_caps (GstVideoCaptionType type)
 GType
 gst_video_afd_meta_api_get_type (void)
 {
-  static volatile GType type;
+  static volatile GType type = 0;
 
   if (g_once_init_enter (&type)) {
     static const gchar *tags[] = {
@@ -1227,7 +1227,7 @@ gst_buffer_add_video_afd_meta (GstBuffer * buffer, guint8 field,
 GType
 gst_video_bar_meta_api_get_type (void)
 {
-  static volatile GType type;
+  static volatile GType type = 0;
 
   if (g_once_init_enter (&type)) {
     static const gchar *tags[] = {