"sequence:%" G_GINT64_FORMAT " , first_sequence:%" G_GINT64_FORMAT
" , last_sequence:%" G_GINT64_FORMAT, m3u8->sequence,
first_sequence, last_sequence);
- if (m3u8->sequence >= last_sequence - 3) {
+ if (m3u8->sequence > last_sequence - 3) {
//demux->need_segment = TRUE;
/* Make sure we never go below the minimum sequence number */
m3u8->sequence = MAX (first_sequence, last_sequence - 3);
file = g_list_last (self->files);
/* for live streams, start GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE from
- * the end of the playlist. See section 6.3.3 of HLS draft. Note
- * the -1, because GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE = 1 means
- * start 1 target-duration from the end */
- for (i = 0; i < GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE - 1 && file->prev;
- ++i)
+ * the end of the playlist. See section 6.3.3 of HLS draft */
+ for (i = 0; i < GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE && file->prev; ++i)
file = file->prev;
} else {
file = g_list_first (self->files);
}
count = g_list_length (m3u8->files);
- for (walk = m3u8->files; walk && count >= min_distance; walk = walk->next) {
+ for (walk = m3u8->files; walk && count > min_distance; walk = walk->next) {
file = walk->data;
--count;
duration += file->duration;