Make sure that unlinked pads do not cause a return false on latency events.
authorHavard Graff <havard.graff@tandberg.com>
Tue, 13 Oct 2009 15:24:34 +0000 (17:24 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 6 Jun 2012 11:42:32 +0000 (13:42 +0200)
Context: Latency configuration should not be
messed up because of not-linked pads. In general,
one return FALSE on latency distribution causes
the "overall" pipeline latency configuration to
fail. This shows up as noise in logs (warning).

Conflicts:

gst/gstpad.c

gst/gstpad.c

index d002e15..73981f3 100644 (file)
@@ -4430,6 +4430,11 @@ not_linked:
     GST_DEBUG_OBJECT (pad, "Dropping event because pad is not linked");
     GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PENDING_EVENTS);
     gst_event_unref (event);
+
+    /* unlinked pads should not influence latency configuration */
+    if (event_type == GST_EVENT_LATENCY)
+      return GST_FLOW_OK;
+
     return GST_FLOW_NOT_LINKED;
   }
 idle_probe_stopped: