GNOME Bugzilla – Bug 668097
[subtitleoverlay] fix state change stall on PAUSED->READY->PAUSED (patch)
Last modified: 2012-01-23 17:15:10 UTC
Created attachment 205448 [details] Test program for subtitleoverlay state change stall 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. Git-formatted patch attached, and a simple quickly-hacked-up test program I used which does NULL->READY->PAUSED->READY->PAUSED, useful with GST_DEBUG="*:2,GST_STATES:4,subtitleoverlay:5". I tested the patch with 0.10.32 gst+plugins-base, and it seems to fix the issue. This is the first time I've looked at GST, so be sure to double-check I understood everything correctly :)
Created attachment 205450 [details] [review] fix state change stall on PAUSED->READY->PAUSED
It makes sense to me. Thanks for the patch. commit dd8f9aca92df070157172bdeb97c93c33a3d5c22 Author: Anssi Hannula <anssi.hannula@iki.fi> Date: Tue Jan 17 16:05:41 2012 +0200 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.