Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2fd35f7 authored by Ronghua Wu's avatar Ronghua Wu Committed by Android Git Automerger
Browse files

am 57c332bd: am c024de3c: media: ignore null InputStream

* commit '57c332bd':
  media: ignore null InputStream
parents 8738d736 57c332bd
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -2243,11 +2243,15 @@ public class MediaPlayer implements SubtitleController.Listener
        final InputStream fIs = is;
        final MediaFormat fFormat = format;

        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
        final HandlerThread thread = new HandlerThread("SubtitleReadThread",