diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-04-16 16:23:47 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-04-17 14:17:52 +0200 |
commit | d2ce4911530760d7bd4e2ec1dcd3e65c93c5b7b2 (patch) | |
tree | 315d47417a8599d30cd34aeb2b8dd90fcfd3784a | |
parent | 72b142bfdfdb70b324c5d0805ec8318a9a687128 (diff) |
{time,clock}overlay: Hold the class-global pango mutex when changing the pango context
-rw-r--r-- | ext/pango/gstclockoverlay.c | 2 | ||||
-rw-r--r-- | ext/pango/gsttimeoverlay.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/ext/pango/gstclockoverlay.c b/ext/pango/gstclockoverlay.c index fe5b0bb83..d90cff1c3 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 c959c420c..27fab9205 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 |