From 0f1a1598ca6b1b4e5515be20e7ac92cb94b55702 Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Sat, 18 Feb 2006 19:53:48 +0000 Subject: [PATCH] ext/pango/: Those functions are called with lock held. Original commit message from CVS: 2006-02-18 Julien MOUTTE * ext/pango/gstclockoverlay.c: (gst_clock_overlay_get_text): * ext/pango/gsttimeoverlay.c: (gst_time_overlay_get_text): Those functions are called with lock held. --- ChangeLog | 6 ++++++ ext/pango/gstclockoverlay.c | 3 +-- ext/pango/gsttimeoverlay.c | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c9327a27e..f0596b9006 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-02-18 Julien MOUTTE + + * ext/pango/gstclockoverlay.c: (gst_clock_overlay_get_text): + * ext/pango/gsttimeoverlay.c: (gst_time_overlay_get_text): Those + functions are called with lock held. + 2006-02-18 Julien MOUTTE * ext/pango/gsttextoverlay.c: (gst_text_overlay_base_init), diff --git a/ext/pango/gstclockoverlay.c b/ext/pango/gstclockoverlay.c index f51f27e482..87f24ba481 100644 --- a/ext/pango/gstclockoverlay.c +++ b/ext/pango/gstclockoverlay.c @@ -86,6 +86,7 @@ gst_clock_overlay_render_time (GstClockOverlay * overlay) return g_strdup_printf ("%02u:%02u:%02u", t.tm_hour, t.tm_min, t.tm_sec); } +/* Called with lock held */ static gchar * gst_clock_overlay_get_text (GstTextOverlay * overlay, GstBuffer * video_frame) { @@ -93,9 +94,7 @@ gst_clock_overlay_get_text (GstTextOverlay * overlay, GstBuffer * video_frame) overlay->need_render = TRUE; - GST_OBJECT_LOCK (overlay); txt = g_strdup (overlay->default_text); - GST_OBJECT_UNLOCK (overlay); time_str = gst_clock_overlay_render_time (GST_CLOCK_OVERLAY (overlay)); if (txt != NULL && *txt != '\0') { diff --git a/ext/pango/gsttimeoverlay.c b/ext/pango/gsttimeoverlay.c index edbcea6c6c..34633b1252 100644 --- a/ext/pango/gsttimeoverlay.c +++ b/ext/pango/gsttimeoverlay.c @@ -89,6 +89,7 @@ gst_time_overlay_render_time (GstTimeOverlay * overlay, GstClockTime time) return g_strdup_printf ("%u:%02u:%02u.%03u", hours, mins, secs, msecs); } +/* Called with lock held */ static gchar * gst_time_overlay_get_text (GstTextOverlay * overlay, GstBuffer * video_frame) { @@ -104,9 +105,7 @@ gst_time_overlay_get_text (GstTextOverlay * overlay, GstBuffer * video_frame) GST_DEBUG ("buffer with timestamp %" GST_TIME_FORMAT, GST_TIME_ARGS (time)); - GST_OBJECT_LOCK (overlay); txt = g_strdup (overlay->default_text); - GST_OBJECT_UNLOCK (overlay); time_str = gst_time_overlay_render_time (GST_TIME_OVERLAY (overlay), time); if (txt != NULL && *txt != '\0') {