diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 0f6e32f856..54fdeb283a 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -2,6 +2,9 @@ ### dev-v2 (not yet released) +* Core library: + * Log a warning when `SingleSampleMediaPeriod` transforms a load error + into end-of-stream. * Extractors: * Fix Vorbis private codec data parsing in the Matroska extractor ([#8496](https://github.com/google/ExoPlayer/issues/8496)). diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/SingleSampleMediaPeriod.java b/library/core/src/main/java/com/google/android/exoplayer2/source/SingleSampleMediaPeriod.java index 23c623e000..9e5d8aae54 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/source/SingleSampleMediaPeriod.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/source/SingleSampleMediaPeriod.java @@ -33,6 +33,7 @@ import com.google.android.exoplayer2.upstream.Loader.Loadable; import com.google.android.exoplayer2.upstream.StatsDataSource; import com.google.android.exoplayer2.upstream.TransferListener; import com.google.android.exoplayer2.util.Assertions; +import com.google.android.exoplayer2.util.Log; import com.google.android.exoplayer2.util.MimeTypes; import com.google.android.exoplayer2.util.Util; import java.io.IOException; @@ -45,6 +46,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull; /* package */ final class SingleSampleMediaPeriod implements MediaPeriod, Loader.Callback { + private static final String TAG = "SingleSampleMediaPeriod"; + /** The initial size of the allocation used to hold the sample data. */ private static final int INITIAL_SAMPLE_SIZE = 1024; @@ -290,6 +293,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull; LoadErrorAction action; if (treatLoadErrorsAsEndOfStream && errorCanBePropagated) { + Log.w(TAG, "Loading failed, treating as end-of-stream.", error); loadingFinished = true; action = Loader.DONT_RETRY; } else {