Skip to content

Problems Side Loading Subtitles in ExoPlayer v2.0.1 #1882

Closed

Description

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions