[Android] PlaybackService: register VLCVout callbacks after a restart

Thomas Guillem git at videolan.org
Thu Oct 8 16:00:16 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Oct  8 15:59:35 2015 +0200| [82d4fb2d5c91e31a8e428aa53449bd030893effa] | committer: Thomas Guillem

PlaybackService: register VLCVout callbacks after a restart

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=82d4fb2d5c91e31a8e428aa53449bd030893effa
---

 vlc-android/src/org/videolan/vlc/PlaybackService.java |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 3c3b4b3..39cdea6 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -180,6 +180,8 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
                 mp.setAudioOutputDevice("hdmi");
         } else
             mIsAudioTrack = false;
+        mp.getVLCVout().addCallback(this);
+
         return mp;
     }
 
@@ -192,7 +194,6 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
         super.onCreate();
 
         mMediaPlayer = newMediaPlayer();
-        mMediaPlayer.getVLCVout().addCallback(this);
 
         if (!VLCInstance.testCompatibleCPU(this)) {
             stopSelf();



More information about the Android mailing list