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 534331 - race in decodebin when changing states while the internal fakesink is removed
race in decodebin when changing states while the internal fakesink is removed
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-22 11:34 UTC by Sjoerd Simons
Modified: 2008-05-22 11:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Lock the fakesink state before changing it to NULl and removing it (884 bytes, patch)
2008-05-22 11:35 UTC, Sjoerd Simons
committed Details | Review

Description Sjoerd Simons 2008-05-22 11:34:12 UTC
Hi,

  When at the time decodebin removes its internal fakesink a state change is done
  the fakesink might just be asked to change state just before being removed from the decodebin causing a very nice:


GStreamer-CRITICAL **: 
Trying to dispose element fakesink, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.


Will attach a fix
Comment 1 Sjoerd Simons 2008-05-22 11:35:11 UTC
Created attachment 111333 [details] [review]
Lock the fakesink state before changing it to NULl and removing it
Comment 2 Wim Taymans 2008-05-22 11:36:30 UTC
or even better, do like decodebin2 and get rid of the fakesink altogether!
Comment 3 Sjoerd Simons 2008-05-22 11:47:11 UTC
But that would mean i'd have to remove a lot of code and forces me to decipher the logic of the element :)
Comment 4 Wim Taymans 2008-05-22 11:49:35 UTC
I know what you mean :)
Comment 5 Wim Taymans 2008-05-22 11:59:36 UTC
        Patch by: Sjoerd Simons <sjoerd at luon dot net>

        * gst/playback/gstdecodebin.c: (remove_fakesink):
        Lock the fakesink before setting the state to NULL and removing it from
        the bin so that a concurrent state change cannot interfere.
        Fixes #534331.