[Android] Seed playback random and reset on loop
Geoffrey Métais
git at videolan.org
Fri Mar 18 16:35:58 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Mar 18 16:34:58 2016 +0100| [3c5c882cd61baf2f05488c171082ec01f10ec8ac] | committer: Geoffrey Métais
Seed playback random and reset on loop
> https://code.videolan.org/videolan/vlc-android/commit/3c5c882cd61baf2f05488c171082ec01f10ec8ac
---
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 25317b5..63ffc39 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1018,9 +1018,10 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
return;
} else {
mPrevious.clear();
+ mRandom = new Random(System.currentTimeMillis());
}
}
- if(mRandom == null) mRandom = new Random();
+ if(mRandom == null) mRandom = new Random(System.currentTimeMillis());
// Find a new index not in mPrevious.
do
{
More information about the Android
mailing list