am c024de3c: media: ignore null InputStream
* commit 'c024de3c946c18e8e4799eb8d372fdec3146f8cf': media: ignore null InputStream
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