[Android] LibVLC: Sanity check
Geoffrey Métais
git at videolan.org
Mon Oct 21 13:58:06 CEST 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Oct 21 13:57:24 2019 +0200| [c1434fe37c1e475a295fb7d368b580e16c5c58a4] | committer: Geoffrey Métais
LibVLC: Sanity check
> https://code.videolan.org/videolan/vlc-android/commit/c1434fe37c1e475a295fb7d368b580e16c5c58a4
---
libvlc/src/org/videolan/libvlc/VideoHelper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvlc/src/org/videolan/libvlc/VideoHelper.java b/libvlc/src/org/videolan/libvlc/VideoHelper.java
index 95b2a15a0..86b163a79 100644
--- a/libvlc/src/org/videolan/libvlc/VideoHelper.java
+++ b/libvlc/src/org/videolan/libvlc/VideoHelper.java
@@ -186,7 +186,7 @@ class VideoHelper implements IVLCVout.OnNewVideoLayoutListener {
@TargetApi(Build.VERSION_CODES.N)
void updateVideoSurfaces() {
- if (mMediaPlayer == null || mMediaPlayer.isReleased()) return;
+ if (mMediaPlayer == null || mMediaPlayer.isReleased() || !mMediaPlayer.getVLCVout().areViewsAttached()) 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