* commit 'c2fd35f7ae51d83b3d8f7f46c70e351bf0f18235': media: ignore null InputStream
This commit is contained in:
@@ -2243,11 +2243,15 @@ public class MediaPlayer implements SubtitleController.Listener
|
|||||||
final InputStream fIs = is;
|
final InputStream fIs = is;
|
||||||
final MediaFormat fFormat = format;
|
final MediaFormat fFormat = format;
|
||||||
|
|
||||||
|
if (is != null) {
|
||||||
// Ensure all input streams are closed. It is also a handy
|
// Ensure all input streams are closed. It is also a handy
|
||||||
// way to implement timeouts in the future.
|
// way to implement timeouts in the future.
|
||||||
synchronized(mOpenSubtitleSources) {
|
synchronized(mOpenSubtitleSources) {
|
||||||
mOpenSubtitleSources.add(is);
|
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
|
||||||
final HandlerThread thread = new HandlerThread("SubtitleReadThread",
|
final HandlerThread thread = new HandlerThread("SubtitleReadThread",
|
||||||
|
|||||||
Reference in New Issue
Block a user