[Android] LibVLC: Sanity check

Geoffrey Métais git at videolan.org
Wed Mar 13 15:56:49 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar 13 15:53:47 2019 +0100| [910fbba2a3fb8c8a39b2c0f8659e6e82e720115d] | committer: Geoffrey Métais

LibVLC: Sanity check

> https://code.videolan.org/videolan/vlc-android/commit/910fbba2a3fb8c8a39b2c0f8659e6e82e720115d
---

 libvlc/src/org/videolan/libvlc/VideoHelper.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libvlc/src/org/videolan/libvlc/VideoHelper.java b/libvlc/src/org/videolan/libvlc/VideoHelper.java
index 00b3215a4..69b813144 100644
--- a/libvlc/src/org/videolan/libvlc/VideoHelper.java
+++ b/libvlc/src/org/videolan/libvlc/VideoHelper.java
@@ -186,6 +186,7 @@ class VideoHelper implements IVLCVout.OnNewVideoLayoutListener {
 
     @TargetApi(Build.VERSION_CODES.N)
     void updateVideoSurfaces() {
+        if (mMediaPlayer == null || mMediaPlayer.isReleased()) return;
         final boolean isPrimary = mDisplayManager == null || mDisplayManager.isPrimary();
         final Activity activity = isPrimary && mVideoSurfaceFrame.getContext() instanceof Activity ? (Activity) mVideoSurfaceFrame.getContext() : null;
 



More information about the Android mailing list