You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use SmoothStreaming / Playready and depend on Side Loading independent TTML Subtitles.
Found two problems trying to Side Load TTML Subtitles using MergingMediaSource containing SingleSampleMediaSource and SsMediaSource:
1-
DefaultTrackSelector.selectTextTrack correctly receives the TTML track, but it never gets it selected.
Hint : adjusting the score check in a DefaultTrackSelector subclass to be {if (trackScore >= selectedTrackScore) ... } , Solved it and got it selected.
2 -
Received crash:
Caused by: java.lang.NullPointerException: Attempt to get length of null array
at com.google.android.exoplayer2.source.SingleSampleMediaPeriod$SourceLoadable.load(SingleSampleMediaPeriod.java:272)
Examining this NullPointerException crash , we found that it is checking length of SourceLoadable.sampleData before it ever gets initialized or assigned.
The text was updated successfully, but these errors were encountered:
1 - It's working as intended that the track isn't selected by default. If you want this behaviour, you should specify C.SELECTION_FLAG_DEFAULT as the selectionFlags argument when creating the format for the text track. DefaultTrackSelector also exposes methods for selecting the track.
- Fix NPE issue in SingleSampleMediaPeriod.
- Delay handling of EOS in TextRenderer until the last
subtitle is fully played out.
Issue: #1882
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134979286
We use SmoothStreaming / Playready and depend on Side Loading independent TTML Subtitles.
Found two problems trying to Side Load TTML Subtitles using MergingMediaSource containing SingleSampleMediaSource and SsMediaSource:
1-
DefaultTrackSelector.selectTextTrack correctly receives the TTML track, but it never gets it selected.
Hint : adjusting the score check in a DefaultTrackSelector subclass to be {if (trackScore >= selectedTrackScore) ... } , Solved it and got it selected.
2 -
Received crash:
Caused by: java.lang.NullPointerException: Attempt to get length of null array
at com.google.android.exoplayer2.source.SingleSampleMediaPeriod$SourceLoadable.load(SingleSampleMediaPeriod.java:272)
Examining this NullPointerException crash , we found that it is checking length of SourceLoadable.sampleData before it ever gets initialized or assigned.
The text was updated successfully, but these errors were encountered: