diff --git a/libs/gst/base/gstaggregator.c b/libs/gst/base/gstaggregator.c index 5cdb852dc1..16287dd092 100644 --- a/libs/gst/base/gstaggregator.c +++ b/libs/gst/base/gstaggregator.c @@ -814,9 +814,9 @@ gst_aggregator_pad_skip_buffers (GstElement * self, GstPad * epad, PAD_LOCK (aggpad); - item = g_queue_peek_head_link (&aggpad->priv->data); + item = g_queue_peek_tail_link (&aggpad->priv->data); while (item) { - GList *next = item->next; + GList *prev = item->prev; if (GST_IS_BUFFER (item->data) && klass->skip_buffer (aggpad, agg, item->data)) { @@ -828,7 +828,7 @@ gst_aggregator_pad_skip_buffers (GstElement * self, GstPad * epad, break; } - item = next; + item = prev; } PAD_UNLOCK (aggpad);