hlsdemux2: Improve detection of playlist updates

In the case we are not updating an existing playlist, we only want to reset the
download error count if the URI we are downloading was not the previous one we
were trying to load

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6392>
This commit is contained in:
Edward Hervey 2024-03-18 14:57:43 +01:00 committed by GStreamer Marge Bot
parent b417c62940
commit 8438c3f567

View file

@ -726,7 +726,9 @@ start_playlist_download (GstHLSDemuxPlaylistLoader * pl,
} else {
/* This is the first time loading this playlist URI, clear the error counter
* and redirect URI */
priv->download_error_count = 0;
if (!priv->loading_playlist_uri
|| g_strcmp0 (orig_uri, priv->loading_playlist_uri))
priv->download_error_count = 0;
g_free (priv->current_playlist_redirect_uri);
priv->current_playlist_redirect_uri = NULL;
}