[vlc-commits] commit: use unsigned rand-function in playlist thread (Ilkka Ollakka )
git at videolan.org
git at videolan.org
Wed Jul 28 12:53:07 CEST 2010
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Jul 28 13:28:33 2010 +0300| [389cb8ef5ac692b152b782515c16bcdaafabd7d4] | committer: Ilkka Ollakka
use unsigned rand-function in playlist thread
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=389cb8ef5ac692b152b782515c16bcdaafabd7d4
---
src/playlist/thread.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/playlist/thread.c b/src/playlist/thread.c
index 1940996..a87881c 100644
--- a/src/playlist/thread.c
+++ b/src/playlist/thread.c
@@ -195,7 +195,7 @@ static void ResetCurrentlyPlaying( playlist_t *p_playlist,
/* Shuffle the array */
for( unsigned j = p_playlist->current.i_size - 1; j > 0; j-- )
{
- unsigned i = ((unsigned)vlc_mrand48()) % (j+1); /* between 0 and j */
+ unsigned i = vlc_lrand48() % (j+1); /* between 0 and j */
playlist_item_t *p_tmp;
/* swap the two items */
p_tmp = ARRAY_VAL(p_playlist->current, i);
More information about the vlc-commits
mailing list