mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-11 02:24:13 +00:00
rtpjitterbuffer: Use an empty iterator in iterate_internal_link when no links
We used to setup an iterator with 1 GValue set with a NULL object pointer which is not the normal way to do that. Instead we should make sure that the first call to gst_iterator_next returns GST_ITERATOR_DONE.
This commit is contained in:
parent
b3d1ab5267
commit
aa89278ade
1 changed files with 8 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue