[Bug 753344] hlsdemux: Fix playback of live streams
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Fri Aug 7 02:05:42 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=753344
--- Comment #6 from Athanasios Oikonomou <athoik at gmail.com> ---
@alexvrs, Could you please try one also?
diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c
index 5e78d94..4ca761c 100755
--- a/ext/hls/m3u8.c
+++ b/ext/hls/m3u8.c
@@ -850,17 +850,20 @@ gst_m3u8_client_update (GstM3U8Client * self, gchar *
data)
}
if (m3u8->files && self->sequence == -1) {
- self->current_file = g_list_first (m3u8->files);
if (GST_M3U8_CLIENT_IS_LIVE (self)) {
/* for live streams, start GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE from
the end of the playlist. See section 6.3.3 of HLS draft */
gint pos =
g_list_length (m3u8->files) - GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE;
+ self->current_file = g_list_nth (m3u8->files,
+ pos >= 0 ? pos : 0)
self->sequence =
GST_M3U8_MEDIA_FILE (g_list_nth_data (m3u8->files,
pos >= 0 ? pos : 0))->sequence;
- } else
+ } else {
+ self->current_file = g_list_first (m3u8->files);
self->sequence = GST_M3U8_MEDIA_FILE
(self->current_file->data)->sequence;
+ }
self->sequence_position = 0;
GST_DEBUG ("Setting first sequence at %u", (guint) self->sequence);
}
The only difference is that will set current_file to the same file that
sequence points. So it will use the last 3 segments from list and then will
request the next segment.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list