projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a9a0da
)
hls: m3u8playlist: fix silly queue iteration code
author
Tim-Philipp Müller
<tim@centricular.com>
Sun, 30 Aug 2015 16:01:13 +0000
(17:01 +0100)
committer
Tim-Philipp Müller
<tim@centricular.com>
Tue, 29 Sep 2015 23:43:26 +0000
(
00:43
+0100)
ext/hls/gstm3u8playlist.c
patch
|
blob
|
history
diff --git
a/ext/hls/gstm3u8playlist.c
b/ext/hls/gstm3u8playlist.c
index
ccd9f4d
..
271ba1e
100644
(file)
--- 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;
}