diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 81ac490ae0..5261a4f4a0 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -41,6 +41,11 @@ * Add option to `MergingMediaSource` to clip the durations of all sources to have the same length ([#8422](https://github.com/google/ExoPlayer/issues/8422)). + * Fix propagation of `LoadErrorHandlingPolicy` from + `DefaultMediaSourceFactory` into `SingleSampleMediaSource.Factory` when + creating subtitle media sources from + `MediaItem.playbackProperties.subtitles` + ([#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 diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/DefaultMediaSourceFactory.java b/library/core/src/main/java/com/google/android/exoplayer2/source/DefaultMediaSourceFactory.java index b30e7c268a..bb82a0c245 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/source/DefaultMediaSourceFactory.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/source/DefaultMediaSourceFactory.java @@ -360,7 +360,8 @@ public final class DefaultMediaSourceFactory implements MediaSourceFactory { MediaSource[] mediaSources = new MediaSource[subtitles.size() + 1]; mediaSources[0] = mediaSource; SingleSampleMediaSource.Factory singleSampleSourceFactory = - new SingleSampleMediaSource.Factory(dataSourceFactory); + new SingleSampleMediaSource.Factory(dataSourceFactory) + .setLoadErrorHandlingPolicy(loadErrorHandlingPolicy); for (int i = 0; i < subtitles.size(); i++) { mediaSources[i + 1] = singleSampleSourceFactory.createMediaSource(