[Android] LibVLC: Sanity check
Geoffrey Métais
git at videolan.org
Mon Oct 21 14:01:22 CEST 2019
vlc-android | branch: 3.2.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Oct 21 13:57:24 2019 +0200| [902467eed47afb67ddfd08360cba139f0985b101] | committer: Geoffrey Métais
LibVLC: Sanity check
(cherry picked from commit c1434fe37c1e475a295fb7d368b580e16c5c58a4)
> https://code.videolan.org/videolan/vlc-android/commit/902467eed47afb67ddfd08360cba139f0985b101
---
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