media: ignore null InputStream
Bug: 22854896 Change-Id: I20b9e28bbba6dec73538ee6937d337c2e2b971f4
This commit is contained in:
@ -2243,10 +2243,14 @@ public class MediaPlayer implements SubtitleController.Listener
|
|||||||
final InputStream fIs = is;
|
final InputStream fIs = is;
|
||||||
final MediaFormat fFormat = format;
|
final MediaFormat fFormat = format;
|
||||||
|
|
||||||
// Ensure all input streams are closed. It is also a handy
|
if (is != null) {
|
||||||
// way to implement timeouts in the future.
|
// Ensure all input streams are closed. It is also a handy
|
||||||
synchronized(mOpenSubtitleSources) {
|
// way to implement timeouts in the future.
|
||||||
mOpenSubtitleSources.add(is);
|
synchronized(mOpenSubtitleSources) {
|
||||||
|
mOpenSubtitleSources.add(is);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Log.w(TAG, "addSubtitleSource called with null InputStream");
|
||||||
}
|
}
|
||||||
|
|
||||||
// process each subtitle in its own thread
|
// process each subtitle in its own thread
|
||||||
|
Reference in New Issue
Block a user