summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-08-30 17:01:13 +0100
committerTim-Philipp Müller <tim@centricular.com>2015-09-30 00:43:26 +0100
commitcae2fa0cef857f8ba09b66cff960d29995d92da5 (patch)
tree2f5b3972d5a7b19009b662c80a7c8851a7110428 /ext
parent4a9a0da50f200496fa9e09754b4b693037f04b02 (diff)
downloadgstreamer-plugins-bad-cae2fa0cef857f8ba09b66cff960d29995d92da5.tar.gz
hls: m3u8playlist: fix silly queue iteration code
Diffstat (limited to 'ext')
-rw-r--r--ext/hls/gstm3u8playlist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/hls/gstm3u8playlist.c b/ext/hls/gstm3u8playlist.c
index ccd9f4da6..271ba1e6f 100644
--- a/ext/hls/gstm3u8playlist.c
+++ b/ext/hls/gstm3u8playlist.c
@@ -119,12 +119,12 @@ gst_m3u8_playlist_add_entry (GstM3U8Playlist * playlist,
static guint
gst_m3u8_playlist_target_duration (GstM3U8Playlist * playlist)
{
- gint i;
- GstM3U8Entry *entry;
guint64 target_duration = 0;
+ GList *l;
+
+ for (l = playlist->entries->head; l != NULL; l = l->next) {
+ GstM3U8Entry *entry = l->data;
- for (i = 0; i < playlist->entries->length; i++) {
- entry = (GstM3U8Entry *) g_queue_peek_nth (playlist->entries, i);
if (entry->duration > target_duration)
target_duration = entry->duration;
}