ext/pango/: Those functions are called with lock held.

Original commit message from CVS:
2006-02-18  Julien MOUTTE  <julien@moutte.net>

* 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.
This commit is contained in:
Julien Moutte 2006-02-18 19:53:48 +00:00
parent f46d2ed4c4
commit 0f1a1598ca
3 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2006-02-18 Julien MOUTTE <julien@moutte.net>
* 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 <julien@moutte.net>
* ext/pango/gsttextoverlay.c: (gst_text_overlay_base_init),

View file

@ -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') {

View file

@ -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') {