mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
tagdemux: Fix crash when shutting down element during getrange()
Ensure that nothing is in any of the streaming thread functions anymore when going from PAUSED to READY. While the parent's state change function has deactivated all pads, there is nothing preventing downstream from activating our srcpad again and calling the getrange() function. Although we're in READY! https://bugzilla.gnome.org/show_bug.cgi?id=775687
This commit is contained in:
parent
9fd90258e6
commit
7c1a32e28b
1 changed files with 8 additions and 0 deletions
|
@ -1726,11 +1726,19 @@ gst_tag_demux_change_state (GstElement * element, GstStateChange transition)
|
|||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
/* Ensure that nothing is in any of the streaming thread functions
|
||||
* anymore. While the above has deactivated all pads, there is nothing
|
||||
* preventing downstream from activating our srcpad again and calling the
|
||||
* getrange() function. Although we're in READY!
|
||||
*/
|
||||
GST_PAD_STREAM_LOCK (demux->priv->srcpad);
|
||||
gst_tag_demux_reset (demux);
|
||||
GST_PAD_STREAM_UNLOCK (demux->priv->srcpad);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue