mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
pad: Drop sticky events pushed on flushing srcpads instead of activating them immediately
This commit is contained in:
parent
7295f3e2f6
commit
26ca7546a7
1 changed files with 17 additions and 6 deletions
23
gst/gstpad.c
23
gst/gstpad.c
|
@ -4423,14 +4423,18 @@ again:
|
|||
|
||||
/* store the event on the pad, but only on srcpads */
|
||||
if (GST_PAD_IS_SRC (pad) && GST_EVENT_IS_STICKY (event)) {
|
||||
guint idx;
|
||||
if (GST_PAD_IS_FLUSHING (pad)) {
|
||||
goto flushing;
|
||||
} else {
|
||||
guint idx;
|
||||
|
||||
idx = GST_EVENT_STICKY_IDX (event);
|
||||
GST_LOG_OBJECT (pad, "storing sticky event %s at index %u",
|
||||
GST_EVENT_TYPE_NAME (event), idx);
|
||||
idx = GST_EVENT_STICKY_IDX (event);
|
||||
GST_LOG_OBJECT (pad, "storing sticky event %s at index %u",
|
||||
GST_EVENT_TYPE_NAME (event), idx);
|
||||
|
||||
/* srcpad sticky events always become active immediately */
|
||||
gst_event_replace (&pad->priv->events[idx].event, event);
|
||||
/* srcpad sticky events always become active immediately */
|
||||
gst_event_replace (&pad->priv->events[idx].event, event);
|
||||
}
|
||||
}
|
||||
|
||||
/* drop all events when blocking. Sticky events will stay on the pad and will
|
||||
|
@ -4547,6 +4551,13 @@ not_linked:
|
|||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
flushing:
|
||||
{
|
||||
GST_DEBUG_OBJECT (pad, "Dropping event because pad is flushing");
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue