Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
913067e3
Commit
913067e3
authored
Sep 12, 2005
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* 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
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/playlist/playlist.c
src/playlist/playlist.c
+5
-3
No files found.
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
Markdown
is supported
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