From f4c3aef13a634be4316cc73716084716489a5461 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 2 Apr 2013 21:53:10 -0400 Subject: [PATCH] rtpssrcdemux: Don't cross the internal links We had the wrong condition to check for the internal links, so RTP and RTCP pads got crossed! --- gst/rtpmanager/gstrtpssrcdemux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/rtpmanager/gstrtpssrcdemux.c b/gst/rtpmanager/gstrtpssrcdemux.c index 540558f..7296fc9 100644 --- a/gst/rtpmanager/gstrtpssrcdemux.c +++ b/gst/rtpmanager/gstrtpssrcdemux.c @@ -852,10 +852,12 @@ src_pad_compare_func (gconstpointer a, gconstpointer b) { GstPad *pad = GST_PAD (g_value_get_object (a)); const gchar *prefix = g_value_get_string (b); - gint res = 1; + gint res; + /* 0 means equal means we accept the pad, accepted if there is a name + * and it starts with the prefix */ GST_OBJECT_LOCK (pad); - res = !GST_PAD_NAME (pad) || g_str_has_prefix (GST_PAD_NAME (pad), prefix); + res = !GST_PAD_NAME (pad) || !g_str_has_prefix (GST_PAD_NAME (pad), prefix); GST_OBJECT_UNLOCK (pad); return res; -- 2.7.4