Don't forward LATENCY event when not ready

When we are not ready to handle a latency query (we are not yet prerolled) we
also don't try to forward the latency event because that might cause unexpected
errors when upstream is not yet linked.
This commit is contained in:
Wim Taymans 2009-02-23 10:53:17 +01:00
parent b81b9c0e59
commit 805569c873

View file

@ -3579,6 +3579,8 @@ gst_base_sink_send_event (GstElement * element, GstEvent * event)
* it to the clock. */
GST_OBJECT_LOCK (element);
basesink->priv->latency = latency;
if (!basesink->priv->have_latency)
forward = FALSE;
GST_OBJECT_UNLOCK (element);
GST_DEBUG_OBJECT (basesink, "latency set to %" GST_TIME_FORMAT,
GST_TIME_ARGS (latency));