After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 588078 - [playbin2] Fails to go to READY again after an error
[playbin2] Fails to go to READY again after an error
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 0.10.24
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-08 14:38 UTC by Sebastian Dröge (slomo)
Modified: 2009-07-10 15:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test.c (2.96 KB, text/plain)
2009-07-10 05:12 UTC, Sebastian Dröge (slomo)
  Details
playbin2.diff (957 bytes, patch)
2009-07-10 15:06 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2009-07-08 14:38:30 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).
Comment 1 Sebastian Dröge (slomo) 2009-07-08 14:51:04 UTC
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).
Comment 2 Sebastian Dröge (slomo) 2009-07-09 20:11:56 UTC
And this is really a bug in playbin2, a simple pipeline with just uridecodebin handles this correctly.
Comment 3 Sebastian Dröge (slomo) 2009-07-09 20:19:57 UTC
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? :)
Comment 4 Sebastian Dröge (slomo) 2009-07-10 05:12:18 UTC
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.
Comment 5 Sebastian Dröge (slomo) 2009-07-10 15:06:21 UTC
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.
Comment 6 Sebastian Dröge (slomo) 2009-07-10 15:12:26 UTC
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.