[Android] [PATCH] VideoPlayerActivity was checking incorrect View.

Evan Leis evan.explodes at gmail.com
Thu Nov 3 22:56:50 CET 2016


VideoPlayerActivity was checking the wrong view's visibility
to determine whether or not to apply the subtitle surface to
the current IVLCVout. This could have led to an NPE.

This not being an NPE is possibly evidence that mPresentation
is not fully utilized and could possible be removed altogether.
---
 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 21f42a1..3b83322 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -784,7 +784,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                 vlcVout.setSubtitlesView(mSubtitlesSurfaceView);
         } else {
             vlcVout.setVideoView(mPresentation.mSurfaceView);
-            if (mSubtitlesSurfaceView.getVisibility() != View.GONE)
+            if (mPresentation.mSubtitlesSurfaceView.getVisibility() != View.GONE)
                 vlcVout.setSubtitlesView(mPresentation.mSubtitlesSurfaceView);
         }
         vlcVout.addCallback(this);
-- 
2.7.4



More information about the Android mailing list