[Android] Fix playback speed rate set to 1 when resuming

Nicolas Pomepuy git at videolan.org
Thu Mar 28 14:29:00 CET 2019


vlc-android | branch: 3.1.x | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Wed Mar 20 09:42:33 2019 +0100| [6ddb64aebeed9c07d83c49daa71be188757fd1c6] | committer: Geoffrey Métais

Fix playback speed rate set to 1 when resuming

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

 vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index e9ed30069..52811a88f 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -162,15 +162,15 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
             repeating = settings.getInt(if (audio) "audio_repeating" else "media_repeating", REPEAT_NONE)
             val position = settings.getInt(if (audio) "position_in_audio_list" else "position_in_media_list", 0)
             savedTime = settings.getLong(if (audio) "position_in_song" else "position_in_media", -1)
+            if (!audio && position < playList.size && settings.getBoolean(PreferencesActivity.VIDEO_PAUSED, false)) {
+                playList[position].addFlags(MediaWrapper.MEDIA_PAUSED)
+            }
+            load(playList, position, true)
+            loadingLastPlaylist = false
             if (!audio) {
-                if (position < playList.size && settings.getBoolean(PreferencesActivity.VIDEO_PAUSED, false)) {
-                    playList[position].addFlags(MediaWrapper.MEDIA_PAUSED)
-                }
                 val rate = settings.getFloat(PreferencesActivity.VIDEO_SPEED, player.getRate())
                 if (rate != 1.0f) player.setRate(rate, false)
             }
-            load(playList, position, true)
-            loadingLastPlaylist = false
         }
         return true
     }



More information about the Android mailing list