#include <vlc_common.h>
#include <vlc_input.h>
#include <vlc_interface.h>
+#include <vlc_rand.h>
#include "vcd.h"
#include "vcdplayer.h"
/* Pick a random selection. */
unsigned int bsn=vcdinf_get_bsn(p_vcdplayer->pxd.psd);
int rand_selection=bsn +
- (int) ((i_selections+0.0)*rand()/(RAND_MAX+1.0));
+ ((unsigned)vlc_lrand48() % (unsigned)i_selections);
lid_t rand_lid=vcdinfo_selection_get_lid (p_vcdplayer->vcd,
p_vcdplayer->i_lid,
rand_selection);
return READ_BLOCK;
} else if (p_vcdplayer->i_still) {
/* Hack: Just go back and do still again */
- msleep(1000);
+ msleep(10000);
return READ_STILL_FRAME;
}
}