mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
typefind: Only push pending buffers and events if we have caps
This commit is contained in:
parent
922815996f
commit
cf0566f9ca
1 changed files with 3 additions and 2 deletions
|
@ -543,12 +543,13 @@ stop_typefinding (GstTypeFindElement * typefind)
|
|||
|
||||
gst_element_get_state (GST_ELEMENT (typefind), &state, NULL, 0);
|
||||
|
||||
push_cached_buffers = (state >= GST_STATE_PAUSED);
|
||||
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" : "");
|
||||
|
||||
GST_OBJECT_LOCK (typefind);
|
||||
avail = gst_adapter_available (typefind->adapter);
|
||||
if (avail == 0)
|
||||
goto no_data;
|
||||
|
|
Loading…
Reference in a new issue