Commit 3ec0ccab by olly Committed by Oliver Woodman

Check for null entries in ConcatenatingMediaSource

We do this in the dynamic case, and I think we've seen
a few GitHub issues where developers do this and don't
understand what they've done wrong (because the failure
comes later).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163688557
parent c2d7e054
...@@ -57,6 +57,9 @@ public final class ConcatenatingMediaSource implements MediaSource { ...@@ -57,6 +57,9 @@ public final class ConcatenatingMediaSource implements MediaSource {
* {@link MediaSource} instance to be present more than once in the array. * {@link MediaSource} instance to be present more than once in the array.
*/ */
public ConcatenatingMediaSource(boolean isRepeatOneAtomic, MediaSource... mediaSources) { public ConcatenatingMediaSource(boolean isRepeatOneAtomic, MediaSource... mediaSources) {
for (MediaSource mediaSource : mediaSources) {
Assertions.checkNotNull(mediaSource);
}
this.mediaSources = mediaSources; this.mediaSources = mediaSources;
this.isRepeatOneAtomic = isRepeatOneAtomic; this.isRepeatOneAtomic = isRepeatOneAtomic;
timelines = new Timeline[mediaSources.length]; timelines = new Timeline[mediaSources.length];
......
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