rtprtxqueue: reverse pending list before pushing buffers
authorMiguel París Díaz <mparisdiaz@gmail.com>
Fri, 19 Jun 2015 12:50:59 +0000 (14:50 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 22 Jun 2015 09:36:22 +0000 (11:36 +0200)
With this we send the RTX buffers in the same order
that they were requested.

https://bugzilla.gnome.org/show_bug.cgi?id=751297

gst/rtpmanager/gstrtprtxqueue.c

index 8e98543..0566f74 100644 (file)
@@ -276,6 +276,7 @@ gst_rtp_rtx_queue_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
   rtx->pending = NULL;
   g_mutex_unlock (&rtx->lock);
 
+  pending = g_list_reverse (pending);
   g_list_foreach (pending, (GFunc) do_push, rtx);
   g_list_free (pending);
 
@@ -312,6 +313,7 @@ gst_rtp_rtx_queue_chain_list (GstPad * pad, GstObject * parent,
   rtx->pending = NULL;
   g_mutex_unlock (&rtx->lock);
 
+  pending = g_list_reverse (pending);
   g_list_foreach (pending, (GFunc) do_push, rtx);
   g_list_free (pending);