summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHavard Graff <havard.graff@tandberg.com>2009-10-13 17:24:34 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2012-06-06 13:22:19 +0200
commita4b9b79c960bf39eb7307984da80dcd642e60993 (patch)
tree0ed13ef1bbf7b2eac31c7c162f132d7b3922e7f7
parent9760c012f6286febadd5f7970f2b3a52e8294ebc (diff)
downloadgstreamer-a4b9b79c960bf39eb7307984da80dcd642e60993.tar.gz
Make sure that unlinked pads do not cause a return false on latency events.
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).
-rw-r--r--gst/gstpad.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gst/gstpad.c b/gst/gstpad.c
index e742c7caa4..c04c974bca 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -5206,6 +5206,7 @@ gst_pad_push_event (GstPad * pad, GstEvent * event)
{
GstPad *peerpad;
gboolean result;
+ gboolean is_latency = FALSE;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
@@ -5242,6 +5243,8 @@ gst_pad_push_event (GstPad * pad, GstEvent * event)
goto flushed;
}
break;
+ case GST_EVENT_LATENCY:
+ is_latency = TRUE;
default:
while (G_UNLIKELY (GST_PAD_IS_BLOCKED (pad))) {
/* block the event as long as the pad is blocked */
@@ -5295,6 +5298,10 @@ not_linked:
GST_DEBUG_OBJECT (pad, "Dropping event because pad is not linked");
gst_event_unref (event);
GST_OBJECT_UNLOCK (pad);
+
+ if (is_latency) /* unlinked pads should not influence latency configuration */
+ return TRUE;
+
return FALSE;
}
flushed: