From 3054355dc1bf9df817bd257d523408ece64472d8 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Fri, 26 Aug 2011 17:54:51 +0000 Subject: [PATCH] hlsdemux: We do not need to set the current playlist to the main one When caching fragments, if we set the current playlist to main, then it will always think it's a live stream (no endlist in it) so it will force the redownload of the main playlist after every seek, which is unnecessary. Also, it causes a race condition where a seek migh happen during that redownload, and we'll think we're trying to seek a live pipeline. --- gst/hls/gsthlsdemux.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/gst/hls/gsthlsdemux.c b/gst/hls/gsthlsdemux.c index 18c0bc03ef..89e80557ad 100644 --- a/gst/hls/gsthlsdemux.c +++ b/gst/hls/gsthlsdemux.c @@ -939,17 +939,6 @@ gst_hls_demux_cache_fragments (GstHLSDemux * demux) { gint i; - /* Start parsing the main playlist */ - gst_m3u8_client_set_current (demux->client, demux->client->main); - - if (gst_m3u8_client_is_live (demux->client)) { - if (!gst_hls_demux_update_playlist (demux, FALSE)) { - GST_ERROR_OBJECT (demux, "Could not fetch the main playlist %s", - demux->client->main->uri); - return FALSE; - } - } - /* If this playlist is a variant playlist, select the first one * and update it */ if (gst_m3u8_client_has_variant_playlist (demux->client)) {