mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 21:35:44 +00:00
hlsdemux: don't update the playlist if we stay in the same bitrate
This commit is contained in:
parent
cd0aeb2403
commit
daeed217e5
1 changed files with 12 additions and 9 deletions
|
@ -848,15 +848,18 @@ gst_hls_demux_update_playlist (GstHLSDemux * demux, gboolean retry)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_hls_demux_change_playlist (GstHLSDemux * demux, gboolean is_fast)
|
gst_hls_demux_change_playlist (GstHLSDemux * demux, gboolean is_fast)
|
||||||
{
|
{
|
||||||
if (is_fast) {
|
GList *list;
|
||||||
if (!demux->client->main->lists->next)
|
|
||||||
return TRUE;
|
if (is_fast)
|
||||||
demux->client->main->lists = g_list_next (demux->client->main->lists);
|
list = g_list_next (demux->client->main->lists);
|
||||||
} else {
|
else
|
||||||
if (!demux->client->main->lists->prev)
|
list = g_list_previous (demux->client->main->lists);
|
||||||
return TRUE;
|
|
||||||
demux->client->main->lists = g_list_previous (demux->client->main->lists);
|
/* Don't do anything else if the playlist is the same */
|
||||||
}
|
if (!list || list->data == demux->client->current)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
demux->client->main->lists = list;
|
||||||
|
|
||||||
gst_m3u8_client_set_current (demux->client, demux->client->main->lists->data);
|
gst_m3u8_client_set_current (demux->client, demux->client->main->lists->data);
|
||||||
gst_hls_demux_update_playlist (demux, TRUE);
|
gst_hls_demux_update_playlist (demux, TRUE);
|
||||||
|
|
Loading…
Reference in a new issue