mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
hls: m3u8playlist: fix silly queue iteration code
This commit is contained in:
parent
4a9a0da50f
commit
cae2fa0cef
1 changed files with 4 additions and 4 deletions
|
@ -119,12 +119,12 @@ gst_m3u8_playlist_add_entry (GstM3U8Playlist * playlist,
|
||||||
static guint
|
static guint
|
||||||
gst_m3u8_playlist_target_duration (GstM3U8Playlist * playlist)
|
gst_m3u8_playlist_target_duration (GstM3U8Playlist * playlist)
|
||||||
{
|
{
|
||||||
gint i;
|
|
||||||
GstM3U8Entry *entry;
|
|
||||||
guint64 target_duration = 0;
|
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)
|
if (entry->duration > target_duration)
|
||||||
target_duration = entry->duration;
|
target_duration = entry->duration;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue