diff --git a/ext/pango/gstclockoverlay.c b/ext/pango/gstclockoverlay.c index fe5b0bb838..d90cff1c31 100644 --- a/ext/pango/gstclockoverlay.c +++ b/ext/pango/gstclockoverlay.c @@ -163,6 +163,7 @@ gst_clock_overlay_class_init (GstClockOverlayClass * klass) "Format to use for time and date value, as in strftime.", DEFAULT_PROP_TIMEFORMAT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_mutex_lock (GST_TEXT_OVERLAY_CLASS (klass)->pango_lock); context = GST_TEXT_OVERLAY_CLASS (klass)->pango_context; pango_context_set_language (context, pango_language_from_string ("en_US")); @@ -177,6 +178,7 @@ gst_clock_overlay_class_init (GstClockOverlayClass * klass) pango_font_description_set_size (font_description, 18 * PANGO_SCALE); pango_context_set_font_description (context, font_description); pango_font_description_free (font_description); + g_mutex_unlock (GST_TEXT_OVERLAY_CLASS (klass)->pango_lock); } diff --git a/ext/pango/gsttimeoverlay.c b/ext/pango/gsttimeoverlay.c index c959c420c3..27fab92057 100644 --- a/ext/pango/gsttimeoverlay.c +++ b/ext/pango/gsttimeoverlay.c @@ -123,6 +123,7 @@ gst_time_overlay_class_init (GstTimeOverlayClass * klass) gsttextoverlay_class->get_text = gst_time_overlay_get_text; + g_mutex_lock (GST_TEXT_OVERLAY_CLASS (klass)->pango_lock); context = GST_TEXT_OVERLAY_CLASS (klass)->pango_context; pango_context_set_language (context, pango_language_from_string ("en_US")); @@ -137,6 +138,7 @@ gst_time_overlay_class_init (GstTimeOverlayClass * klass) pango_font_description_set_size (font_description, 18 * PANGO_SCALE); pango_context_set_font_description (context, font_description); pango_font_description_free (font_description); + g_mutex_unlock (GST_TEXT_OVERLAY_CLASS (klass)->pango_lock); } static void