Fix NPE in FakeAdaptiveMediaPeriod.

The compositeSequenableLoader was causing NPEs in isLoading. Initializing it
upfront prevents this problem and is in line with what we do in all real
MediaPeriods.

PiperOrigin-RevId: 275491511
This commit is contained in:
tonihei 2019-10-18 17:48:21 +01:00 committed by Oliver Woodman
parent 694ccf424b
commit 4e667b899d

View File

@ -61,6 +61,7 @@ public class FakeAdaptiveMediaPeriod extends FakeMediaPeriod
this.transferListener = transferListener; this.transferListener = transferListener;
this.durationUs = durationUs; this.durationUs = durationUs;
this.sampleStreams = newSampleStreamArray(0); this.sampleStreams = newSampleStreamArray(0);
this.sequenceableLoader = new CompositeSequenceableLoader(new SequenceableLoader[0]);
} }
@Override @Override