mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Fix NPE in HLS playback of non-muxed streams
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=149749504
This commit is contained in:
parent
0cb9802e1b
commit
cb0187959c
1 changed files with 3 additions and 2 deletions
|
|
@ -33,6 +33,7 @@ import com.google.android.exoplayer2.upstream.Allocator;
|
|||
import com.google.android.exoplayer2.util.Assertions;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -331,7 +332,7 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper
|
|||
// Build audio stream wrappers.
|
||||
for (int i = 0; i < audioRenditions.size(); i++) {
|
||||
sampleStreamWrapper = buildSampleStreamWrapper(C.TRACK_TYPE_AUDIO,
|
||||
new HlsUrl[] {audioRenditions.get(i)}, null, null);
|
||||
new HlsUrl[] {audioRenditions.get(i)}, null, Collections.<Format>emptyList());
|
||||
sampleStreamWrappers[currentWrapperIndex++] = sampleStreamWrapper;
|
||||
sampleStreamWrapper.continuePreparing();
|
||||
}
|
||||
|
|
@ -340,7 +341,7 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper
|
|||
for (int i = 0; i < subtitleRenditions.size(); i++) {
|
||||
HlsUrl url = subtitleRenditions.get(i);
|
||||
sampleStreamWrapper = buildSampleStreamWrapper(C.TRACK_TYPE_TEXT, new HlsUrl[] {url}, null,
|
||||
null);
|
||||
Collections.<Format>emptyList());
|
||||
sampleStreamWrapper.prepareSingleTrack(url.format);
|
||||
sampleStreamWrappers[currentWrapperIndex++] = sampleStreamWrapper;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue