From a4f0be6e3345380346ebb7de8b10169f2c8a8591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 31 Dec 2014 19:40:20 +0000 Subject: [PATCH] oggmux: fix silly GQueue iteration code --- ext/ogg/gstoggmux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index a2e9d2c9b8..3be40dd107 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -642,14 +642,14 @@ gst_ogg_mux_dequeue_page (GstOggMux * mux, GstFlowReturn * flowret) } } else { /* We then need to check for a non-negative granulepos */ - int i; gboolean valid = FALSE; + GList *l; - for (i = 0; i < pad->pagebuffers->length; i++) { - buf = g_queue_peek_nth (pad->pagebuffers, i); + for (l = pad->pagebuffers->head; l != NULL; l = l->next) { + buf = l->data; /* Here we check the OFFSET_END, which is actually temporarily the * granulepos value for this buffer */ - if (GST_BUFFER_OFFSET_END (buf) != -1) { + if (GST_BUFFER_OFFSET_END_IS_VALID (buf)) { valid = TRUE; break; }