Merge "MediaPlayer: sanity check track before dereferencing" into pi-dev am: 1ba53717fe
am: 100a7a3907
Change-Id: I3b3df1d18d93f2114b1a02ad6ca35d62a0ac2999
This commit is contained in:
@@ -2848,8 +2848,12 @@ public class MediaPlayer extends PlayerBase
|
||||
mInbandTrackIndices.set(i);
|
||||
}
|
||||
|
||||
if (tracks[i] == null) {
|
||||
Log.w(TAG, "unexpected NULL track at index " + i);
|
||||
}
|
||||
// newly appeared inband track
|
||||
if (tracks[i].getTrackType() == TrackInfo.MEDIA_TRACK_TYPE_SUBTITLE) {
|
||||
if (tracks[i] != null
|
||||
&& tracks[i].getTrackType() == TrackInfo.MEDIA_TRACK_TYPE_SUBTITLE) {
|
||||
SubtitleTrack track = mSubtitleController.addTrack(
|
||||
tracks[i].getFormat());
|
||||
mIndexTrackPairs.add(Pair.create(i, track));
|
||||
|
||||
Reference in New Issue
Block a user