mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
webrtc: Move the transportsendbin pad block removal
Move freeing of the pad blocks back to before we call the GstBin state change function, as there's something racy going on on the build server otherwise, where the pads don't unblock during downward state changes. This is a bit of a stab in the dark, since I can't recreate the build server failure locally.
This commit is contained in:
parent
10a37e0c35
commit
0fca02bb5e
1 changed files with 15 additions and 13 deletions
|
@ -221,21 +221,14 @@ transport_send_bin_change_state (GstElement * element,
|
|||
gst_object_unref (pad);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
|
||||
if (ret == GST_STATE_CHANGE_FAILURE)
|
||||
return ret;
|
||||
|
||||
/* Do downward state change cleanups after the element
|
||||
* has been stopped, as this will have set pads to flushing as needed
|
||||
* and unblocked any pad probes that are blocked */
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
{
|
||||
/* Release pad blocks */
|
||||
/* Normally, we do downward state change cleanups after the element
|
||||
* has been stopped, as this will have set pads to flushing as needed
|
||||
* and unblocked any pad probes that are blocked, but sometimes that's
|
||||
* causing a deadlock on the build server in tests, with a race around
|
||||
* the pad blocking/release timing, so free the pad blocks before
|
||||
* stopping everything */
|
||||
if (send->rtp_block && send->rtp_block->block_id) {
|
||||
gst_pad_remove_probe (send->rtp_block->pad, send->rtp_block->block_id);
|
||||
send->rtp_block->block_id = 0;
|
||||
|
@ -262,6 +255,15 @@ transport_send_bin_change_state (GstElement * element,
|
|||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
|
||||
if (ret == GST_STATE_CHANGE_FAILURE)
|
||||
return ret;
|
||||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_READY_TO_NULL:{
|
||||
GstElement *elem;
|
||||
|
||||
|
|
Loading…
Reference in a new issue