From c3d7eecd1f64ae6cdb120cb543d4994a10c2d02c Mon Sep 17 00:00:00 2001 From: eguven Date: Fri, 17 Feb 2017 07:57:49 -0800 Subject: [PATCH] Fix ChunkExtractorWrapper.init(TrackOutput) calls with null TrackOutput after extractor initialized InitializationChunk calls init(null). When the initialization and index data is separate they need to be loaded separately which results to two init(null) calls. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=147837985 --- .../android/exoplayer2/source/chunk/ChunkExtractorWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkExtractorWrapper.java b/library/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkExtractorWrapper.java index 489f63be2b..2a641b80a6 100644 --- a/library/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkExtractorWrapper.java +++ b/library/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkExtractorWrapper.java @@ -88,7 +88,7 @@ public final class ChunkExtractorWrapper implements ExtractorOutput, TrackOutput extractorInitialized = true; } else { extractor.seek(0, 0); - if (sampleFormat != null) { + if (sampleFormat != null && trackOutput != null) { trackOutput.format(sampleFormat); } }