mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
elements: Handle GstIterator RESYNC return value correctly in gst_iterator_foreach()
This commit is contained in:
parent
788c0d220a
commit
e02405b284
2 changed files with 12 additions and 10 deletions
|
@ -800,10 +800,10 @@ gst_concat_change_state (GstElement * element, GstStateChange transition)
|
||||||
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 {
|
while ((res =
|
||||||
res = gst_iterator_foreach (iter, reset_pad, NULL);
|
gst_iterator_foreach (iter, reset_pad,
|
||||||
} while (res == GST_ITERATOR_RESYNC);
|
NULL)) == GST_ITERATOR_RESYNC)
|
||||||
|
gst_iterator_resync (iter);
|
||||||
gst_iterator_free (iter);
|
gst_iterator_free (iter);
|
||||||
|
|
||||||
if (res == GST_ITERATOR_ERROR)
|
if (res == GST_ITERATOR_ERROR)
|
||||||
|
@ -815,10 +815,10 @@ gst_concat_change_state (GstElement * element, GstStateChange transition)
|
||||||
GstIteratorResult res;
|
GstIteratorResult res;
|
||||||
|
|
||||||
g_mutex_lock (&self->lock);
|
g_mutex_lock (&self->lock);
|
||||||
do {
|
while ((res =
|
||||||
res = gst_iterator_foreach (iter, unblock_pad, NULL);
|
gst_iterator_foreach (iter, unblock_pad,
|
||||||
} while (res == GST_ITERATOR_RESYNC);
|
NULL)) == GST_ITERATOR_RESYNC)
|
||||||
|
gst_iterator_resync (iter);
|
||||||
gst_iterator_free (iter);
|
gst_iterator_free (iter);
|
||||||
g_cond_broadcast (&self->cond);
|
g_cond_broadcast (&self->cond);
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
|
|
|
@ -971,8 +971,10 @@ gst_tee_pull_eos (GstTee * tee)
|
||||||
GstIterator *iter;
|
GstIterator *iter;
|
||||||
|
|
||||||
iter = gst_element_iterate_src_pads (GST_ELEMENT (tee));
|
iter = gst_element_iterate_src_pads (GST_ELEMENT (tee));
|
||||||
gst_iterator_foreach (iter, (GstIteratorForeachFunction) gst_tee_push_eos,
|
while (gst_iterator_foreach (iter,
|
||||||
tee);
|
(GstIteratorForeachFunction) gst_tee_push_eos,
|
||||||
|
tee) == GST_ITERATOR_RESYNC)
|
||||||
|
gst_iterator_resync (iter);
|
||||||
gst_iterator_free (iter);
|
gst_iterator_free (iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue