vlc | branch: master | Max Dilipovich <[email protected]> | Fri Apr 11 23:05:19 2014 +0400| [a73ff93d23d4e20e2966c07f2d669087d97891b2] | committer: Jean-Baptiste Kempf
playlist: repair playlist order on shuffle (fix #4857) Selecting first item to play in random mode as null, the old method was giving a random item at a random position which resulted in only a part of the queue playing. If we set first item to NULL, playlist automaticaly selects first item from the reshuffled queue in the request processing loop. Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a73ff93d23d4e20e2966c07f2d669087d97891b2 --- src/playlist/item.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/playlist/item.c b/src/playlist/item.c index 69426da..088d8d7 100644 --- a/src/playlist/item.c +++ b/src/playlist/item.c @@ -146,10 +146,7 @@ static void input_item_add_subitem_tree ( const vlc_event_t * p_event, if( var_GetBool( p_playlist, "random" ) ) { - unsigned rand_pos = - ((unsigned)vlc_mrand48()) % (last_pos - pos); - rand_pos += pos; - p_play_item = p_item->pp_children[rand_pos]; + p_play_item = NULL; } else { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
