appsink: fix initial pile-up of caps events

appsink was queuing the caps event both in its GstBaseSinkClass.set_caps()
and its GstBaseSinkClass.sink_event() implementation, but only signaling
new_event from `sink_event`.

This caused `new_event` callbacks to start lagging by one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7749>
This commit is contained in:
Mathieu Duponchelle 2024-10-25 17:00:48 +02:00 committed by GStreamer Marge Bot
parent 727424452a
commit 33da5f0d5d

View file

@ -868,9 +868,6 @@ gst_app_sink_setcaps (GstBaseSink * sink, GstCaps * caps)
g_mutex_lock (&priv->mutex);
GST_DEBUG_OBJECT (appsink, "receiving CAPS");
gst_vec_deque_push_tail (priv->queue, gst_event_new_caps (caps));
gst_queue_status_info_push_event (&priv->queue_status_info);
if (!priv->preroll_buffer)
gst_caps_replace (&priv->preroll_caps, caps);
g_mutex_unlock (&priv->mutex);