GNOME Bugzilla – Bug 667562
[0.11] Race condition between streaming thread and resetting pads in downwards state change
Last modified: 2012-07-19 10:13:48 UTC
Happens when stopping playback by setting state to READY, for example with the audio decoder base class: ** CRITICAL **: gst_audio_decoder_finish_frame: assertion `buf == NULL || gst_pad_has_current_caps (dec->srcpad)' failed aborting... (gdb) bt
+ Trace 229416
Thread 1 (Thread 0x7ffff7f3a920 (LWP 7032))
There were state-change related fixes lately, do those help with this by any chance?
The behaviour it encounters is not fatal imho. The pads being deactivated while the streaming thread is active is a common behaviour, and the expected result is to return GST_FLOW_WRONG_STATE. Either we can use GST_PAD_IS_ACTIVE (srcpad) or we can store a local variable to know if we are active or not. And if it's not the case, return GST_FLOW_WRONG_STATE.
Created attachment 219202 [details] [review] audiodecoder: Don't assert on pad caps not being set The decoder might have been de-activated in the meantime (resulting in NULL pad caps). If the decoder really isn't configured, then it will error out further down when checking whether the GST_AUDIO_INFO_IS_VALID()
commit 55f692eff682b78c924c5d79087e9f91e4dc93bb Author: Edward Hervey <edward.hervey@collabora.co.uk> Date: Thu Jul 19 10:54:07 2012 +0200 audiodecoder: Don't assert on pad caps not being set The decoder might have been de-activated in the meantime (resulting in NULL pad caps). If the decoder really isn't configured, then it will error out further down when checking whether the GST_AUDIO_INFO_IS_VALID() https://bugzilla.gnome.org/show_bug.cgi?id=667562