mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
gstpad: Unset EOS event on FLUSH_STOP
This commit is contained in:
parent
a930f67697
commit
2ba6017363
1 changed files with 15 additions and 0 deletions
15
gst/gstpad.c
15
gst/gstpad.c
|
@ -4215,6 +4215,14 @@ gst_pad_push_event (GstPad * pad, GstEvent * event)
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_FLUSH_STOP:
|
case GST_EVENT_FLUSH_STOP:
|
||||||
GST_PAD_UNSET_FLUSHING (pad);
|
GST_PAD_UNSET_FLUSHING (pad);
|
||||||
|
|
||||||
|
/* Remove sticky EOS events */
|
||||||
|
GST_LOG_OBJECT (pad, "Removing pending EOS events");
|
||||||
|
gst_event_replace (&pad->priv->
|
||||||
|
events[GST_EVENT_STICKY_IDX_TYPE (GST_EVENT_EOS)].pending, NULL);
|
||||||
|
gst_event_replace (&pad->priv->
|
||||||
|
events[GST_EVENT_STICKY_IDX_TYPE (GST_EVENT_EOS)].event, NULL);
|
||||||
|
|
||||||
if (G_UNLIKELY (GST_PAD_IS_BLOCKED (pad))) {
|
if (G_UNLIKELY (GST_PAD_IS_BLOCKED (pad))) {
|
||||||
GST_LOG_OBJECT (pad, "Pad is blocked, not forwarding flush-stop");
|
GST_LOG_OBJECT (pad, "Pad is blocked, not forwarding flush-stop");
|
||||||
goto flushed;
|
goto flushed;
|
||||||
|
@ -4419,6 +4427,13 @@ gst_pad_send_event (GstPad * pad, GstEvent * event)
|
||||||
GST_PAD_UNSET_FLUSHING (pad);
|
GST_PAD_UNSET_FLUSHING (pad);
|
||||||
GST_CAT_DEBUG_OBJECT (GST_CAT_EVENT, pad, "cleared flush flag");
|
GST_CAT_DEBUG_OBJECT (GST_CAT_EVENT, pad, "cleared flush flag");
|
||||||
}
|
}
|
||||||
|
/* Remove pending EOS events */
|
||||||
|
GST_LOG_OBJECT (pad, "Removing pending EOS events");
|
||||||
|
gst_event_replace (&pad->priv->
|
||||||
|
events[GST_EVENT_STICKY_IDX_TYPE (GST_EVENT_EOS)].pending, NULL);
|
||||||
|
gst_event_replace (&pad->priv->
|
||||||
|
events[GST_EVENT_STICKY_IDX_TYPE (GST_EVENT_EOS)].event, NULL);
|
||||||
|
|
||||||
GST_OBJECT_UNLOCK (pad);
|
GST_OBJECT_UNLOCK (pad);
|
||||||
/* grab stream lock */
|
/* grab stream lock */
|
||||||
GST_PAD_STREAM_LOCK (pad);
|
GST_PAD_STREAM_LOCK (pad);
|
||||||
|
|
Loading…
Reference in a new issue