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 708789 - playbin: make sure elements are in null before disposing
playbin: make sure elements are in null before disposing
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal normal
: 1.2.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-25 22:39 UTC by Thiago Sousa Santos
Modified: 2013-10-04 11:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
playbin: make sure elements are in null before disposing (1.63 KB, patch)
2013-09-25 22:39 UTC, Thiago Sousa Santos
needs-work Details | Review

Description Thiago Sousa Santos 2013-09-25 22:39:09 UTC
It is quite common to see messages of elements being disposed in READY.
Specially happens when pipelines fail when prerolling. I tracked those down
to a particular unref in the group deactivation.

Putting the patch here for review in case there is a reason not to force it
to null when unreffing. Maybe if the sink was set externally there is some
use case that we should keep it in non-null?

* Can't think of any, but I'd like someone to look at this before pushing.
Comment 1 Thiago Sousa Santos 2013-09-25 22:39:10 UTC
Created attachment 255729 [details] [review]
playbin: make sure elements are in null before disposing

If a pipeline fails to preroll, it might happen that the sinks are
put into READY state from playbin's sink activation, but they are never
set to playsink, so they aren't being managed by a GstBin and will keep
their READY state until they are unreffed, leading to a warning.

Prevent this by always forcing them to NULL when deactivating a group
Comment 2 Sebastian Dröge (slomo) 2013-09-26 08:45:49 UTC
Comment on attachment 255729 [details] [review]
playbin: make sure elements are in null before disposing

This will break gapless playback. You must only handle the states of the sinks inside playbin if they're not inside playsink yet.
Comment 3 Thiago Sousa Santos 2013-10-01 21:06:15 UTC
commit f8d8a56d7bb594d2f7de2d73bb435d19139df2b8
Author: Thiago Santos <ts.santos@partner.samsung.com>
Date:   Tue Sep 24 16:47:52 2013 -0700

    playbin: make sure elements are in null before disposing
    
    If a pipeline fails to preroll, it might happen that the sinks are
    put into READY state from playbin's sink activation, but they are never
    set to playsink, so they aren't being managed by a GstBin and will keep
    their READY state until they are unreffed, leading to a warning.
    
    Prevent this by always forcing them to NULL when deactivating a group
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708789


Just noticed I forgot to fix the commit message when fixed the code, it only forces it to null when not inside playsink.
Comment 4 Sebastian Dröge (slomo) 2013-10-01 21:18:46 UTC
Might make sense to backport this to 1.2