mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
adder: ensure sending a flush-stop after flush-start
Previously adder was only sending the flush-stop, when it saw the flushing seek. If one sends a flushing see direcly to an element upstream of adder, it would fail to unflush the downstream pads.
This commit is contained in:
parent
95266cf212
commit
a86ca535c8
1 changed files with 10 additions and 0 deletions
|
@ -817,6 +817,16 @@ gst_adder_sink_event (GstCollectPads * pads, GstCollectData * pad,
|
|||
gst_event_unref (event);
|
||||
event = NULL;
|
||||
}
|
||||
case GST_EVENT_FLUSH_START:
|
||||
/* ensure that we'll eventually send a flush-stop, when we have received a
|
||||
* flush-start (e.g. after a flushing seek directly sent to an element) */
|
||||
if (g_atomic_int_compare_and_exchange (&adder->flush_stop_pending,
|
||||
FALSE, TRUE)) {
|
||||
/* discard flush start events, as we forwarded one already when handing the
|
||||
* flushing seek on the sink pad */
|
||||
discard = TRUE;
|
||||
}
|
||||
break;
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
/* we received a flush-stop. We will only forward it when
|
||||
* flush_stop_pending is set, and we will unset it then.
|
||||
|
|
Loading…
Reference in a new issue