From cf0a4e528e91d860022bfbbe432902a88fe7a508 Mon Sep 17 00:00:00 2001 From: tonihei Date: Thu, 17 Dec 2020 16:13:22 +0000 Subject: [PATCH] Disable delta updates until merging bug is fixed. The delta updates loose information about previous init segments. Until this is properly fixed, we can avoid the problem by not using delta updates. Issue: #5011 PiperOrigin-RevId: 348023895 --- .../source/hls/playlist/DefaultHlsPlaylistTracker.java | 5 +++-- .../source/hls/playlist/DefaultHlsPlaylistTrackerTest.java | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTracker.java b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTracker.java index d527b1ebb1..f41ddce037 100644 --- a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTracker.java +++ b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTracker.java @@ -774,8 +774,9 @@ public final class DefaultHlsPlaylistTracker } } if (playlistSnapshot.serverControl.skipUntilUs != C.TIME_UNSET) { - uriBuilder.appendQueryParameter( - SKIP_PARAM, playlistSnapshot.serverControl.canSkipDateRanges ? "v2" : "YES"); + // TODO: Fix skipped segment merging before re-enabling. + // uriBuilder.appendQueryParameter( + // SKIP_PARAM, playlistSnapshot.serverControl.canSkipDateRanges ? "v2" : "YES"); } return uriBuilder.build(); } diff --git a/library/hls/src/test/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTrackerTest.java b/library/hls/src/test/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTrackerTest.java index 93c94dd21b..b1ef0fd58c 100644 --- a/library/hls/src/test/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTrackerTest.java +++ b/library/hls/src/test/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTrackerTest.java @@ -37,6 +37,7 @@ import okhttp3.mockwebserver.MockWebServer; import okio.Buffer; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -134,6 +135,7 @@ public class DefaultHlsPlaylistTrackerTest { assertThat(secondFullPlaylist.segments).containsNoneIn(firstFullPlaylist.segments); } + @Ignore // Test disabled because playlist delta updates are temporarily disabled. @Test public void start_playlistCanSkip_requestsDeltaUpdateAndExpandsSkippedSegments() throws IOException, TimeoutException, InterruptedException { @@ -168,6 +170,7 @@ public class DefaultHlsPlaylistTrackerTest { .isEqualTo(initialPlaylistWithAllSegments.segments.get(3).url); } + @Ignore // Test disabled because playlist delta updates are temporarily disabled. @Test public void start_playlistCanSkip_missingSegments_correctedMediaSequence() throws IOException, TimeoutException, InterruptedException { @@ -196,6 +199,7 @@ public class DefaultHlsPlaylistTrackerTest { assertThat(mergedPlaylist.segments).hasSize(4); } + @Ignore // Test disabled because playlist delta updates are temporarily disabled. @Test public void start_playlistCanSkipDataRanges_requestsDeltaUpdateV2() throws IOException, TimeoutException, InterruptedException { @@ -220,6 +224,7 @@ public class DefaultHlsPlaylistTrackerTest { assertThat(mediaPlaylists.get(1).mediaSequence).isEqualTo(11); } + @Ignore // Test disabled because playlist delta updates are temporarily disabled. @Test public void start_playlistCanSkipAndUriWithParams_preservesOriginalParams() throws IOException, TimeoutException, InterruptedException { @@ -360,6 +365,7 @@ public class DefaultHlsPlaylistTrackerTest { assertThat(mediaPlaylists.get(1).trailingParts).hasSize(2); } + @Ignore // Test disabled because playlist delta updates are temporarily disabled. @Test public void start_httpBadRequest_forcesFullNonBlockingPlaylistRequest() throws IOException, TimeoutException, InterruptedException {