Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
913067e3
Commit
913067e3
authored
Sep 12, 2005
by
hartman
Browse files
* Fix the issue with random always playing the first item in the playlist initially (closes #217)
parent
9680e16f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/playlist/playlist.c
View file @
913067e3
...
...
@@ -881,13 +881,15 @@ static playlist_item_t * NextItem( playlist_t *p_playlist )
msg_Dbg
(
p_playlist
,
"no-skip mode, stopping"
)
;
return
NULL
;
}
msg_Dbg
(
p_playlist
,
"b_random %d, b_request %d, skip %d"
,
b_random
,
p_playlist
->
request
.
b_request
,
p_playlist
->
request
.
i_skip
);
/* TODO: improve this (only use current node) */
/* TODO: use the "shuffled view" internally ? */
/* Random case. This is an exception: if request, but request is skip +- 1
* we don't go to next item but select a new random one. */
if
(
b_random
&&
(
!
p_playlist
->
request
.
b_request
||
p_playlist
->
request
.
i_skip
==
1
||
p_playlist
->
request
.
i_skip
==
-
1
)
)
if
(
b_random
&&
(
!
p_playlist
->
request
.
b_request
||
(
p_playlist
->
request
.
b_request
&&
(
p_playlist
->
request
.
p_item
==
NULL
||
p_playlist
->
request
.
i_skip
==
1
||
p_playlist
->
request
.
i_skip
==
-
1
)
)
)
)
{
srand
(
(
unsigned
int
)
mdate
()
);
i_new
=
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment