[Android] Fix PIP mode performances

Geoffrey Métais git at videolan.org
Thu Feb 9 13:35:28 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb  9 13:17:56 2017 +0100| [9335c650322ae005b0e965f49204dd0878ef09ce] | committer: Geoffrey Métais

Fix PIP mode performances

> https://code.videolan.org/videolan/vlc-android/commit/9335c650322ae005b0e965f49204dd0878ef09ce
---

 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 4 ++--
 1 file changed, 2 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 f9037a7..ad46bbb 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1852,8 +1852,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
 
     @Override
     public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
-        changeMediaPlayerLayout(mVideoWidth, mVideoHeight);
         super.onPictureInPictureModeChanged(isInPictureInPictureMode);
+        changeSurfaceLayout();
     }
 
     @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
@@ -1904,7 +1904,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
             lp.width  = LayoutParams.MATCH_PARENT;
             lp.height = LayoutParams.MATCH_PARENT;
             surfaceFrame.setLayoutParams(lp);
-            if (mService != null)
+            if (mService != null && mVideoWidth * mVideoHeight == 0)
                 changeMediaPlayerLayout(sw, sh);
             return;
         }



More information about the Android mailing list