mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
concat: dot not reset pad states too early
Resetting the flushing state of the pads at the end of the PAUSED_TO_READY transition will make pads handle serialized queries again which will wait for non-active pads and might cause deadlocks when stopping the pipeline. Move the reset to the READY_TO_PAUSED instead. https://bugzilla.gnome.org/show_bug.cgi?id=752623
This commit is contained in:
parent
c97f82e32b
commit
0accb7f700
1 changed files with 12 additions and 22 deletions
|
@ -797,9 +797,21 @@ gst_concat_change_state (GstElement * element, GstStateChange transition)
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:{
|
case GST_STATE_CHANGE_READY_TO_PAUSED:{
|
||||||
|
GstIterator *iter = gst_element_iterate_sink_pads (element);
|
||||||
|
GstIteratorResult res;
|
||||||
|
|
||||||
self->format = GST_FORMAT_UNDEFINED;
|
self->format = GST_FORMAT_UNDEFINED;
|
||||||
self->current_start_offset = 0;
|
self->current_start_offset = 0;
|
||||||
self->last_stop = GST_CLOCK_TIME_NONE;
|
self->last_stop = GST_CLOCK_TIME_NONE;
|
||||||
|
|
||||||
|
do {
|
||||||
|
res = gst_iterator_foreach (iter, reset_pad, NULL);
|
||||||
|
} while (res == GST_ITERATOR_RESYNC);
|
||||||
|
|
||||||
|
gst_iterator_free (iter);
|
||||||
|
|
||||||
|
if (res == GST_ITERATOR_ERROR)
|
||||||
|
return GST_STATE_CHANGE_FAILURE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:{
|
case GST_STATE_CHANGE_PAUSED_TO_READY:{
|
||||||
|
@ -825,28 +837,6 @@ gst_concat_change_state (GstElement * element, GstStateChange transition)
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
|
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
|
||||||
if (ret == GST_STATE_CHANGE_FAILURE)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
switch (transition) {
|
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:{
|
|
||||||
GstIterator *iter = gst_element_iterate_sink_pads (element);
|
|
||||||
GstIteratorResult res;
|
|
||||||
|
|
||||||
do {
|
|
||||||
res = gst_iterator_foreach (iter, reset_pad, NULL);
|
|
||||||
} while (res == GST_ITERATOR_RESYNC);
|
|
||||||
|
|
||||||
gst_iterator_free (iter);
|
|
||||||
|
|
||||||
if (res == GST_ITERATOR_ERROR)
|
|
||||||
return GST_STATE_CHANGE_FAILURE;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue