GNOME Bugzilla – Bug 588078
[playbin2] Fails to go to READY again after an error
Last modified: 2009-07-10 15:12:26 UTC
Hi, playbin2 currently fails with the following scenario: 1) state set to PLAYING, state change to READY inside the source fails 2) state set to NULL again 3) state set to PLAYING, this time the state change to READY inside the source would succeed but uridecodebin never tries this If the "uri" property of playbin2 is set to the same URI again before 3) everything works as expected, otherwise everything hangs (uridecodebin claims to go to READY but the internally used source plugin gets no state change calls).
Bug #588079 contains a patch to totem which exposes the described behaviour when an unmounted location is played and the password dialog is canceled (note: remove the FIXME line from the patch that sets the "uri" property again).
And this is really a bug in playbin2, a simple pipeline with just uridecodebin handles this correctly.
The problem is, that the second READY->PAUSED in playbin2 will try to switch to the next group but there is not next group. Not sure how to fix this, maybe in error cases the current group should be the next group... Wim, any ideas? :)
Created attachment 138168 [details] test.c Small sample application for this bug. Takes a single parameter which should be an unmounted URI supported by GVFS. The first #if 0 part is a workaround that would make it work, the second #if 0 part shows that everything works with uridecodebin.
Created attachment 138198 [details] [review] playbin2.diff Proposed patch, if READY->PAUSED fails after current/next group were swapped, swap them back to the previous state.
commit 3d751d190d89c10210d2bf0dd4c6019bd4ddc217 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Fri Jul 10 17:08:40 2009 +0200 playbin2: Make it possible for READY->PAUSED to succeed after it failed the If READY->PAUSED failed in the source element we would've swapped the current and next group already. To allow READY->PAUSED to succeed after the first failure we have to swap the current and next group back again. This also ensure that we're again in the same state as before the failed state change and not at the next group. This was especially a problem for playbin2 pipelines that use the new mounting support in giosrc as the source would fail for READY->PAUSED the first time, the application mounts the location and then tries to go READY->PAUSED again (and this time it would succeed). Fixes bug #588078.