From 257de579b39636fc36bef25bcd0dceb23fcbe8a7 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 18 Mar 2024 14:57:43 +0100 Subject: [PATCH] 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: --- .../ext/adaptivedemux2/hls/gsthlsdemux-playlist-loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-playlist-loader.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-playlist-loader.c index 91a9f9eef3..02c53dd9f1 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-playlist-loader.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-playlist-loader.c @@ -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; }