ext/pango/gsttextoverlay.c: Fix state change deadlock.

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

* ext/pango/gsttextoverlay.c: (gst_text_overlay_base_init),
(gst_text_overlay_finalize), (gst_text_overlay_init),
(gst_text_overlay_setcaps), (gst_text_overlay_src_event),
(gst_text_overlay_render_text),
(gst_text_overlay_text_pad_link),
(gst_text_overlay_text_event), (gst_text_overlay_video_event),
(gst_text_overlay_pop_text), (gst_text_overlay_text_chain),
(gst_text_overlay_video_chain), (gst_text_overlay_change_state):
Fix state change deadlock.
This commit is contained in:
Julien Moutte 2006-02-19 12:05:23 +00:00
parent a82c1565d5
commit 4e978f0ebc
2 changed files with 16 additions and 2 deletions

View file

@ -1,3 +1,14 @@
2006-02-19 Julien MOUTTE <julien@moutte.net>
* ext/pango/gsttextoverlay.c: (gst_text_overlay_base_init),
(gst_text_overlay_finalize), (gst_text_overlay_init),
(gst_text_overlay_setcaps), (gst_text_overlay_src_event),
(gst_text_overlay_render_text), (gst_text_overlay_text_pad_link),
(gst_text_overlay_text_event), (gst_text_overlay_video_event),
(gst_text_overlay_pop_text), (gst_text_overlay_text_chain),
(gst_text_overlay_video_chain), (gst_text_overlay_change_state):
Fix state change deadlock.
2006-02-19 Julien MOUTTE <julien@moutte.net> 2006-02-19 Julien MOUTTE <julien@moutte.net>
* ext/pango/gsttextoverlay.c: (gst_text_overlay_base_init), * ext/pango/gsttextoverlay.c: (gst_text_overlay_base_init),

View file

@ -1235,13 +1235,16 @@ static GstStateChangeReturn
gst_text_overlay_change_state (GstElement * element, GstStateChange transition) gst_text_overlay_change_state (GstElement * element, GstStateChange transition)
{ {
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
GstTextOverlay *overlay = GST_TEXT_OVERLAY (element);
/*GstTextOverlay *overlay = GST_TEXT_OVERLAY (element); */
switch (transition) { switch (transition) {
case GST_STATE_CHANGE_READY_TO_PAUSED: case GST_STATE_CHANGE_READY_TO_PAUSED:
break; break;
case GST_STATE_CHANGE_PAUSED_TO_READY: case GST_STATE_CHANGE_PAUSED_TO_READY:
GST_OBJECT_LOCK (overlay);
overlay->text_flushing = TRUE;
gst_text_overlay_pop_text (overlay);
GST_OBJECT_UNLOCK (overlay);
break; break;
default: default:
break; break;