diff options
author | Anssi Hannula <anssi.hannula@iki.fi> | 2012-01-17 16:05:41 +0200 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2012-01-20 17:29:06 +0000 |
commit | dd8f9aca92df070157172bdeb97c93c33a3d5c22 (patch) | |
tree | 1a42d79bac9d60a7479d9b942dbb8c8766e58964 /gst/playback/gstsubtitleoverlay.c | |
parent | 71f70c98efe99aeea191f5c538bd269706928499 (diff) |
subtitleoverlay: fix state change stall on PAUSED->READY->PAUSED
After a PAUSED->READY change the sink pads are currently not set to
blocking state. When the element is set back to PAUSED, the change will
be done asynchronously, but as the _pad_blocked_cb() callback is now not
called, the state change never completes.
Fix that by setting the sink pads to blocking state on a PAUSED->READY
change, which ensures that the _pad_blocked_cb() is called when needed
on any future READY->PAUSED change. The sink pads are already put to
blocking state on NULL->READY change, so this behavior is consistent.
Fixes bug #668097.
Diffstat (limited to 'gst/playback/gstsubtitleoverlay.c')
-rw-r--r-- | gst/playback/gstsubtitleoverlay.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c index 3d93c2730..126ffd2af 100644 --- a/gst/playback/gstsubtitleoverlay.c +++ b/gst/playback/gstsubtitleoverlay.c @@ -1400,6 +1400,15 @@ gst_subtitle_overlay_change_state (GstElement * element, break; case GST_STATE_CHANGE_PAUSED_TO_READY: GST_DEBUG_OBJECT (self, "State change PAUSED->READY"); + + /* Set the pads back to blocking state */ + GST_SUBTITLE_OVERLAY_LOCK (self); + gst_pad_set_blocked_async_full (self->video_block_pad, TRUE, + _pad_blocked_cb, self, NULL); + gst_pad_set_blocked_async_full (self->subtitle_block_pad, TRUE, + _pad_blocked_cb, self, NULL); + GST_SUBTITLE_OVERLAY_UNLOCK (self); + do_async_done (self); break; |