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.
This commit is contained in:
Youness Alaoui 2011-08-26 17:54:51 +00:00 committed by Sebastian Dröge
parent 8fbf3a3129
commit 3054355dc1

View file

@ -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)) {