[Android] [PATCH 2/2] VideoPlayer: configureSurface can be called without hal

Thomas Guillem thomas at gllm.fr
Mon Nov 17 14:44:13 CET 2014


---
 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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 a502414..395aee8 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -874,10 +874,12 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
             @Override
             public void run() {
                 if (mSurface == surface && mSurfaceHolder != null) {
-                    mSurfaceHolder.setFormat(hal);
+                    if (hal != 0)
+                        mSurfaceHolder.setFormat(hal);
                     mSurfaceHolder.setFixedSize(width, height);
                 } else if (mSubtitleSurface == surface && mSubtitlesSurfaceHolder != null) {
-                    mSubtitlesSurfaceHolder.setFormat(hal);
+                    if (hal != 0)
+                        mSubtitlesSurfaceHolder.setFormat(hal);
                     mSubtitlesSurfaceHolder.setFixedSize(width, height);
                 }
 
-- 
2.1.1



More information about the Android mailing list