[Android] Detach Vout before stopping mediaplayer

Geoffrey Métais git at videolan.org
Fri Sep 15 15:43:23 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Sep 15 15:42:45 2017 +0200| [a7a1e2e2b59579a901132cc5de227540700b1b5c] | committer: Geoffrey Métais

Detach Vout before stopping mediaplayer

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

 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 68e095292..88ebb536f 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -2496,6 +2496,8 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
 
     public void restartMediaPlayer() {
         mMediaPlayer.setEventListener(null);
+        if (isVideoPlaying())
+            mMediaPlayer.getVLCVout().detachViews();
         final MediaPlayer mp = mMediaPlayer;
         VLCApplication.runBackground(new Runnable() {
             @Override
@@ -2504,7 +2506,6 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
             }
         });
         mMediaPlayer = newMediaPlayer();
-        /* TODO RESUME */
     }
 
     public static class Client {



More information about the Android mailing list