From 7f0381fdd9a5690b231d83567eb6418a78a08bc7 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Thu, 4 Aug 2016 00:36:28 -0300 Subject: [PATCH] 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. --- gst/rtpmanager/gstrtpjitterbuffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index d9ea04c..7b72deb 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -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); -- 2.7.4