From 2c2197d12cf6bf641251794660e20a7ebb43e5e1 Mon Sep 17 00:00:00 2001 From: aquilescanta Date: Thu, 20 May 2021 17:17:42 +0100 Subject: [PATCH] Assign ERROR_CODE_IO_BAD_HTTP_STATUS to InvalidResponseCodeException PiperOrigin-RevId: 374885599 --- .../com/google/android/exoplayer2/ExoPlayerImplInternal.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java b/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java index 7b343f29d8..6918217003 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java @@ -46,6 +46,7 @@ import com.google.android.exoplayer2.trackselection.ExoTrackSelection; import com.google.android.exoplayer2.trackselection.TrackSelector; import com.google.android.exoplayer2.trackselection.TrackSelectorResult; import com.google.android.exoplayer2.upstream.BandwidthMeter; +import com.google.android.exoplayer2.upstream.HttpDataSource; import com.google.android.exoplayer2.util.Assertions; import com.google.android.exoplayer2.util.Clock; import com.google.android.exoplayer2.util.HandlerWrapper; @@ -571,6 +572,8 @@ import java.util.concurrent.atomic.AtomicBoolean; stopInternal(/* forceResetRenderers= */ true, /* acknowledgeStop= */ false); playbackInfo = playbackInfo.copyWithPlaybackError(e); } + } catch (HttpDataSource.InvalidResponseCodeException e) { + handleIoException(e, PlaybackException.ERROR_CODE_IO_BAD_HTTP_STATUS); } catch (BehindLiveWindowException e) { handleIoException(e, PlaybackException.ERROR_CODE_BEHIND_LIVE_WINDOW); } catch (IOException e) {