[Android] Init info overlay in video player before every use

Geoffrey Métais git at videolan.org
Wed Mar 1 08:51:25 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar  1 08:50:38 2017 +0100| [d5c4986acddf09d2f2bd3fbda69d9dc7be828dc6] | committer: Geoffrey Métais

Init info overlay in video player before every use

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

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java        | 7 +++++--
 1 file changed, 5 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 edd4b23..8aa5ba6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1390,7 +1390,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
             mPlayPause.requestFocus();
     }
 
-    public void delayAudio(long delta){
+    public void delayAudio(long delta) {
+        initInfoOverlay();
         long delay = mService.getAudioDelay()+delta;
         mService.setAudioDelay(delay);
         mInfo.setText(getString(R.string.audio_delay)+"\n"+(delay/1000l)+" ms");
@@ -1401,7 +1402,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
         }
     }
 
-    public void delaySubs(long delta){
+    public void delaySubs(long delta) {
+        initInfoOverlay();
         long delay = mService.getSpuDelay()+delta;
         mService.setSpuDelay(delay);
         mInfo.setText(getString(R.string.spu_delay) + "\n" + (delay / 1000l) + " ms");
@@ -1413,6 +1415,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
     }
 
     public void changeSpeed(float delta){
+        initInfoOverlay();
         float rate = Math.round((mService.getRate()+delta)*100f)/100f;
         if (rate < 0.25f || rate > 4f)
             return;



More information about the Android mailing list