Commit a73ff93d authored by Max Dilipovich's avatar Max Dilipovich Committed by 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: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent d87dbcb0
......@@ -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
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment