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

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

am c024de3c: media: ignore null InputStream

* commit 'c024de3c':
  media: ignore null InputStream
parents a14d1bd7 c024de3c
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",