Skip to content

Commit

Permalink
Merge pull request #1529 from Mrjaco12/master
Browse files Browse the repository at this point in the history
Fix Android audio crash fixes Issue #1417
  • Loading branch information
cobarx authored Apr 4, 2019
2 parents c36a9cf + da8a202 commit c12e9d8
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -975,16 +975,17 @@ public void setSelectedTrack(int trackType, String type, Dynamic value) {
groupIndex = getGroupIndexForDefaultLocale(groups);
}

if (groupIndex == C.INDEX_UNSET && trackType == C.TRACK_TYPE_VIDEO) { // Video auto
if (groups.length != 0) {
TrackGroup group = groups.get(0);
tracks = new int[group.length];
groupIndex = 0;
for (int j = 0; j < group.length; j++) {
tracks[j] = j;
}
if (groupIndex == C.INDEX_UNSET && trackType == C.TRACK_TYPE_VIDEO && groups.length != 0) { // Video auto
// Add all tracks as valid options for ABR to choose from
TrackGroup group = groups.get(0);
tracks = new int[group.length];
groupIndex = 0;
for (int j = 0; j < group.length; j++) {
tracks[j] = j;
}
} else if (groupIndex == C.INDEX_UNSET) {
}

if (groupIndex == C.INDEX_UNSET) {
trackSelector.setParameters(disableParameters);
return;
}
Expand Down

0 comments on commit c12e9d8

Please sign in to comment.