[Android] Update mediaplayer sooner in playback service

Geoffrey Métais git at videolan.org
Fri Nov 3 15:42:27 CET 2017


vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Nov  3 15:27:54 2017 +0100| [6e034726e188e1f9f6478eafa2261a241be01723] | committer: Geoffrey Métais

Update mediaplayer sooner in playback service

(cherry picked from commit 7a3012dbaa5e589af6a5b816af49bfb0ac7d5a62)

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

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

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index e1d8961e0..1b84b6c9b 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -2576,13 +2576,13 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
         if (isVideoPlaying())
             mMediaPlayer.getVLCVout().detachViews();
         final MediaPlayer mp = mMediaPlayer;
+        mMediaPlayer = newMediaPlayer();
         VLCApplication.runBackground(new Runnable() {
             @Override
             public void run() {
                 mp.release();
             }
         });
-        mMediaPlayer = newMediaPlayer();
     }
 
     public static class Client {



More information about the Android mailing list