[Android] Don't determine next index during media transition

Geoffrey Métais git at videolan.org
Fri May 11 16:11:24 CEST 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri May 11 16:04:48 2018 +0200| [8e99ace448ac32b7755a178109aa4030be1c5d18] | committer: Geoffrey Métais

Don't determine next index during media transition

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

 vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 7 ++-----
 1 file changed, 2 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 209a31ec8..9f68277ba 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -671,11 +671,8 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
             MediaPlayer.Event.EndReached -> {
                 saveMediaMeta()
                 if (isBenchmark) player.setPreviousStats()
-                launch(UI, CoroutineStart.UNDISPATCHED) {
-                    determinePrevAndNextIndices(true)
-                    if (nextIndex == -1) savePosition(true)
-                    next()
-                }
+                if (nextIndex == -1) savePosition(true)
+                next()
             }
             MediaPlayer.Event.EncounteredError -> {
                 service.showToast(service.getString(



More information about the Android mailing list