mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
typefind: Forward events that should happen before the caps event directly
There's no point in storing them and sending them later, and doing so would later require to distinguish between events that should come before caps and after. https://bugzilla.gnome.org/show_bug.cgi?id=692784
This commit is contained in:
parent
cf0566f9ca
commit
fc4105c1f9
1 changed files with 16 additions and 7 deletions
|
@ -644,13 +644,22 @@ gst_type_find_element_sink_event (GstPad * pad, GstObject * parent,
|
|||
res = gst_pad_push_event (typefind->src, event);
|
||||
break;
|
||||
default:
|
||||
GST_DEBUG_OBJECT (typefind, "Saving %s event to send later",
|
||||
GST_EVENT_TYPE_NAME (event));
|
||||
GST_OBJECT_LOCK (typefind);
|
||||
typefind->cached_events =
|
||||
g_list_append (typefind->cached_events, event);
|
||||
GST_OBJECT_UNLOCK (typefind);
|
||||
res = TRUE;
|
||||
/* Forward events that would happen before the caps event
|
||||
* directly instead of storing them. There's no reason not
|
||||
* to send them directly and we should only store events
|
||||
* for later sending that would need to come after the caps
|
||||
* event */
|
||||
if (GST_EVENT_TYPE (event) < GST_EVENT_CAPS) {
|
||||
res = gst_pad_push_event (typefind->src, event);
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (typefind, "Saving %s event to send later",
|
||||
GST_EVENT_TYPE_NAME (event));
|
||||
GST_OBJECT_LOCK (typefind);
|
||||
typefind->cached_events =
|
||||
g_list_append (typefind->cached_events, event);
|
||||
GST_OBJECT_UNLOCK (typefind);
|
||||
res = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue