mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
typefind: Push pending events independent of the existence of a downstream chain function and peer
Downstream might create a peer only as result of the events in theory.
This commit is contained in:
parent
32e05f8a1e
commit
7982f682dd
1 changed files with 5 additions and 4 deletions
|
@ -543,13 +543,15 @@ stop_typefinding (GstTypeFindElement * typefind)
|
|||
|
||||
gst_element_get_state (GST_ELEMENT (typefind), &state, NULL, 0);
|
||||
|
||||
GST_OBJECT_LOCK (typefind);
|
||||
|
||||
push_cached_buffers = (state >= GST_STATE_PAUSED && typefind->caps);
|
||||
|
||||
GST_DEBUG_OBJECT (typefind, "stopping typefinding%s",
|
||||
push_cached_buffers ? " and pushing cached buffers" : "");
|
||||
push_cached_buffers ? " and pushing cached events and buffers" : "");
|
||||
|
||||
if (push_cached_buffers)
|
||||
gst_type_find_element_send_cached_events (typefind);
|
||||
|
||||
GST_OBJECT_LOCK (typefind);
|
||||
avail = gst_adapter_available (typefind->adapter);
|
||||
if (avail == 0)
|
||||
goto no_data;
|
||||
|
@ -579,7 +581,6 @@ stop_typefinding (GstTypeFindElement * typefind)
|
|||
typefind->mode = MODE_ERROR; /* make the chain function error out */
|
||||
gst_buffer_unref (buffer);
|
||||
} else {
|
||||
gst_type_find_element_send_cached_events (typefind);
|
||||
gst_pad_push (typefind->src, buffer);
|
||||
}
|
||||
if (peer)
|
||||
|
|
Loading…
Reference in a new issue