mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 01:28:34 +00:00
adaptivedemux: release manifest lock before changing element state
https://bugzilla.gnome.org/show_bug.cgi?id=757335
This commit is contained in:
parent
34c523c3b9
commit
ac58216f05
1 changed files with 7 additions and 2 deletions
|
@ -479,19 +479,24 @@ gst_adaptive_demux_change_state (GstElement * element,
|
|||
GstStateChangeReturn result = GST_STATE_CHANGE_FAILURE;
|
||||
|
||||
GST_API_LOCK (demux);
|
||||
GST_MANIFEST_LOCK (demux);
|
||||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
GST_MANIFEST_LOCK (demux);
|
||||
gst_adaptive_demux_reset (demux);
|
||||
GST_MANIFEST_UNLOCK (demux);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* this must be run without MANIFEST_LOCK taken.
|
||||
* For PLAYING to PLAYING state changes, it will want to take a lock in
|
||||
* src element and that lock is held while the streaming thread is running.
|
||||
* The streaming thread will take the MANIFEST_LOCK, leading to a deadlock.
|
||||
*/
|
||||
result = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
|
||||
|
||||
GST_MANIFEST_UNLOCK (demux);
|
||||
GST_API_UNLOCK (demux);
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue