Commit 03b9fa30 by ibaker Committed by Oliver Woodman

Log a warning when SingleSampleMediaPeriod turns a load error into EOS

Without this no error is currently logged or propagated to EventLogger.
The propagation doesn't happen because
MergingMediaSource.ForwardingEventListener only propagates events
originating from the "main" source in the merge:
<unknown commit>

#minor-release

PiperOrigin-RevId: 354902467
parent 17ca191f
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
### dev-v2 (not yet released) ### dev-v2 (not yet released)
* Core library:
* Log a warning when `SingleSampleMediaPeriod` transforms a load error
into end-of-stream.
* Extractors: * Extractors:
* Fix Vorbis private codec data parsing in the Matroska extractor * Fix Vorbis private codec data parsing in the Matroska extractor
([#8496](https://github.com/google/ExoPlayer/issues/8496)). ([#8496](https://github.com/google/ExoPlayer/issues/8496)).
......
...@@ -33,6 +33,7 @@ import com.google.android.exoplayer2.upstream.Loader.Loadable; ...@@ -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.StatsDataSource;
import com.google.android.exoplayer2.upstream.TransferListener; import com.google.android.exoplayer2.upstream.TransferListener;
import com.google.android.exoplayer2.util.Assertions; 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.MimeTypes;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;
import java.io.IOException; import java.io.IOException;
...@@ -45,6 +46,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull; ...@@ -45,6 +46,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
/* package */ final class SingleSampleMediaPeriod /* package */ final class SingleSampleMediaPeriod
implements MediaPeriod, Loader.Callback<SingleSampleMediaPeriod.SourceLoadable> { implements MediaPeriod, Loader.Callback<SingleSampleMediaPeriod.SourceLoadable> {
private static final String TAG = "SingleSampleMediaPeriod";
/** The initial size of the allocation used to hold the sample data. */ /** The initial size of the allocation used to hold the sample data. */
private static final int INITIAL_SAMPLE_SIZE = 1024; private static final int INITIAL_SAMPLE_SIZE = 1024;
...@@ -290,6 +293,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull; ...@@ -290,6 +293,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
LoadErrorAction action; LoadErrorAction action;
if (treatLoadErrorsAsEndOfStream && errorCanBePropagated) { if (treatLoadErrorsAsEndOfStream && errorCanBePropagated) {
Log.w(TAG, "Loading failed, treating as end-of-stream.", error);
loadingFinished = true; loadingFinished = true;
action = Loader.DONT_RETRY; action = Loader.DONT_RETRY;
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment