rtpjitterbuffer: avoid unref of null buffer
authorThiago Santos <thiagossantos@gmail.com>
Thu, 4 Aug 2016 03:36:28 +0000 (00:36 -0300)
committerThiago Santos <thiagossantos@gmail.com>
Thu, 4 Aug 2016 03:36:28 +0000 (00:36 -0300)
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

index d9ea04c..7b72deb 100644 (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);