[Android] LibVLC: Sanity check
Geoffrey Métais
git at videolan.org
Wed Mar 13 16:24:29 CET 2019
vlc-android | branch: 3.1.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar 13 15:53:47 2019 +0100| [d590899408c158f99053e14dcc1c1248a9281bbe] | committer: Geoffrey Métais
LibVLC: Sanity check
(cherry picked from commit 910fbba2a3fb8c8a39b2c0f8659e6e82e720115d)
> https://code.videolan.org/videolan/vlc-android/commit/d590899408c158f99053e14dcc1c1248a9281bbe
---
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