[Android] [PATCH fix typo] videoPlayer: fix custom aspect ratio from start

Duncan McNamara dcn.mcnamara at gmail.com
Wed Jul 25 17:56:09 CEST 2018


The aspect ratio was set when an ES was selected,
instead of the vout, hence the aspect ratio was
not set for the new vout and fellback to default
---
 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java    | 3 ++-
 1 file changed, 2 insertions(+), 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 ef44120b0..c00275821 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1512,6 +1512,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                 break;
             case MediaPlayer.Event.Vout:
                 updateNavStatus();
+                if (event.getVoutCount() > 0)
+                    changeSurfaceLayout();
                 if (mMenuIdx == -1)
                     handleVout(event.getVoutCount());
                 break;
@@ -1542,7 +1544,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
             case MediaPlayer.Event.ESSelected:
                 if (event.getEsChangedType() == Media.VideoTrack.Type.Video) {
                     Media.VideoTrack vt = mService.getCurrentVideoTrack();
-                    changeSurfaceLayout();
                     if (vt != null)
                         mFov = vt.projection == Media.VideoTrack.Projection.Rectangular ? 0f : DEFAULT_FOV;
                 }
--
2.18.0



More information about the Android mailing list