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 621833 - Setting a pipeline to NULL can sometimes fail due to core state changes going in the wrong direction
Setting a pipeline to NULL can sometimes fail due to core state changes going...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 0.10.37
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-06-16 22:28 UTC by Michael Smith
Modified: 2012-05-22 00:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add test to core testsuite that this works (currently fails) (2.82 KB, patch)
2010-06-16 22:28 UTC, Michael Smith
none Details | Review
Simple patch to fix test. I don't know if this handles all important cases, however. (902 bytes, patch)
2010-06-16 22:30 UTC, Michael Smith
none Details | Review

Description Michael Smith 2010-06-16 22:28:50 UTC
Created attachment 163876 [details] [review]
Add test to core testsuite that this works (currently fails)

It should always be possible to set a pipeline to NULL - this must not fail, otherwise it's impossible to safely unref the pipeline. Because upwards state changes CAN (and do) fail - for example, a filesink getting an error because the destination is read-only - it's imperative that a downwards state change on a pipeline never cause upwards state changes of elements inside it.

This is not currently the case - sometimes core will attempt to move an element to a higher state as part of a downwards state change, and if that fails the downwards state change will then fail. 

I thought this was handled in bug #368536, but that change does not fix the problem entirely.

The attached test case fails on current git. I'll also attach the (hacky) workaround I'm currently using - I don't know if this is the right approach, though something similar was rejected previously, so I guess Wim doesn't like this.
Comment 1 Michael Smith 2010-06-16 22:30:06 UTC
Created attachment 163877 [details] [review]
Simple patch to fix test. I don't know if this handles all important cases, however.
Comment 2 Sebastian Dröge (slomo) 2011-05-26 11:23:12 UTC
Any news on this? Wim?
Comment 3 Wim Taymans 2012-05-18 14:21:02 UTC
commit 554b81ed243c27385e11b925722b91c2fafdcfb4
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Fri May 18 15:04:35 2012 +0200

    bin: try harder to avoid state changes in wrong direction
    
    When the bin does an upward state change, try to avoid doing a downward state
    change on the child and vice versa.
    Add some more unit tests for this fix.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=621833
Comment 4 宋文武 2012-05-22 00:59:06 UTC
gstreamer can't build now, due to use 'gst_pad_set_blocked_async'.   :)