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 <jb@videolan.org>
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
{