Default SingleSampleMediaSource.treatLoadErrorsAsEndOfStream to true

Issue: #8430
PiperOrigin-RevId: 351971671
This commit is contained in:
ibaker 2021-01-15 10:45:18 +00:00 committed by Ian Baker
parent 77a559640b
commit f076080434
2 changed files with 4 additions and 1 deletions

View file

@ -119,6 +119,8 @@
* Remove `ExoPlaybackException.OutOfMemoryError`.
* Remove `setVideoDecoderOutputBufferRenderer` from Player API. Clients
should use `setOutputSurface` directly instead.
* Default `SingleSampleMediaSource.treatLoadErrorsAsEndOfStream` to `true`
([#8430](https://github.com/google/ExoPlayer/issues/8430)).
* Extractors:
* Populate codecs string for H.264/AVC in MP4, Matroska and FLV streams to
allow decoder capability checks based on codec profile/level

View file

@ -55,6 +55,7 @@ public final class SingleSampleMediaSource extends BaseMediaSource {
public Factory(DataSource.Factory dataSourceFactory) {
this.dataSourceFactory = checkNotNull(dataSourceFactory);
loadErrorHandlingPolicy = new DefaultLoadErrorHandlingPolicy();
treatLoadErrorsAsEndOfStream = true;
}
/**
@ -118,7 +119,7 @@ public final class SingleSampleMediaSource extends BaseMediaSource {
/**
* Sets whether load errors will be treated as end-of-stream signal (load errors will not be
* propagated). The default value is false.
* propagated). The default value is true.
*
* @param treatLoadErrorsAsEndOfStream If true, load errors will not be propagated by sample
* streams, treating them as ended instead. If false, load errors will be propagated