am c024de3c: media: ignore null InputStream

* commit 'c024de3c946c18e8e4799eb8d372fdec3146f8cf':
  media: ignore null InputStream
This commit is contained in:
Ronghua Wu
2015-10-13 15:40:48 +00:00
committed by Android Git Automerger

View File

@@ -2243,10 +2243,14 @@ public class MediaPlayer implements SubtitleController.Listener
final InputStream fIs = is;
final MediaFormat fFormat = format;
// Ensure all input streams are closed. It is also a handy
// way to implement timeouts in the future.
synchronized(mOpenSubtitleSources) {
mOpenSubtitleSources.add(is);
if (is != null) {
// Ensure all input streams are closed. It is also a handy
// way to implement timeouts in the future.
synchronized(mOpenSubtitleSources) {
mOpenSubtitleSources.add(is);
}
} else {
Log.w(TAG, "addSubtitleSource called with null InputStream");
}
// process each subtitle in its own thread