rtpjitterbuffer: avoid unref of null buffer

The current 'l' pointer will be NULL when the loop
is interrupted with a 'break' statement. Need to have
it advance to the next list item before interrupting.
This commit is contained in:
Thiago Santos 2016-08-04 00:36:28 -03:00
parent 91e302e00d
commit 7f0381fdd9

View file

@ -2783,8 +2783,10 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
for (l = buffers; l; l = l->next) {
ret = gst_rtp_jitter_buffer_chain (pad, parent, l->data);
l->data = NULL;
if (ret != GST_FLOW_OK)
if (ret != GST_FLOW_OK) {
l = l->next;
break;
}
}
for (; l; l = l->next)
gst_buffer_unref (l->data);