summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gst/rtpmanager/gstrtpjitterbuffer.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c
index 3695e1562..fee6b60ba 100644
--- a/gst/rtpmanager/gstrtpjitterbuffer.c
+++ b/gst/rtpmanager/gstrtpjitterbuffer.c
@@ -860,7 +860,7 @@ gst_rtp_jitter_buffer_iterate_internal_links (GstPad * pad, GstObject * parent)
{
GstRtpJitterBuffer *jitterbuffer;
GstPad *otherpad = NULL;
- GstIterator *it;
+ GstIterator *it = NULL;
GValue val = { 0, };
jitterbuffer = GST_RTP_JITTER_BUFFER_CAST (parent);
@@ -870,13 +870,15 @@ gst_rtp_jitter_buffer_iterate_internal_links (GstPad * pad, GstObject * parent)
} else if (pad == jitterbuffer->priv->srcpad) {
otherpad = jitterbuffer->priv->sinkpad;
} else if (pad == jitterbuffer->priv->rtcpsinkpad) {
- otherpad = NULL;
+ it = gst_iterator_new_single (GST_TYPE_PAD, NULL);
}
- g_value_init (&val, GST_TYPE_PAD);
- g_value_set_object (&val, otherpad);
- it = gst_iterator_new_single (GST_TYPE_PAD, &val);
- g_value_unset (&val);
+ if (it == NULL) {
+ g_value_init (&val, GST_TYPE_PAD);
+ g_value_set_object (&val, otherpad);
+ it = gst_iterator_new_single (GST_TYPE_PAD, &val);
+ g_value_unset (&val);
+ }
return it;
}