Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems Side Loading Subtitles in ExoPlayer v2.0.1 #1882

Closed
mnarmar opened this issue Sep 30, 2016 · 3 comments
Closed

Problems Side Loading Subtitles in ExoPlayer v2.0.1 #1882

mnarmar opened this issue Sep 30, 2016 · 3 comments
Labels

Comments

@mnarmar
Copy link

mnarmar commented Sep 30, 2016

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.

@ojw28 ojw28 added the bug label Oct 3, 2016
@ojw28
Copy link
Contributor

ojw28 commented Oct 3, 2016

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.

2 - This is a bug. We'll push a fix shortly.

@mnarmar
Copy link
Author

mnarmar commented Oct 3, 2016

1 - Thanks providing what is missed
2 - Waiting for the fix

ojw28 added a commit that referenced this issue Oct 3, 2016
- 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:/google/moe
MOE_MIGRATED_REVID=134979286
@ojw28
Copy link
Contributor

ojw28 commented Oct 3, 2016

A fix has been pushed to dev-v2. Thanks!

@ojw28 ojw28 closed this as completed Oct 3, 2016
@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants