Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a1ce9999
Commit
a1ce9999
authored
Aug 26, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check for decoder error before state!=START
When dc->error!=NOERROR, we do not need to check state!=START. Simplify the checks by moving the error check to the top.
parent
c6035ea3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
player_thread.c
src/player_thread.c
+8
-9
No files found.
src/player_thread.c
View file @
a1ce9999
...
...
@@ -217,8 +217,14 @@ static void decodeParent(void)
}
if
(
decodeWaitedOn
)
{
if
(
dc
.
state
!=
DECODE_STATE_START
&&
dc
.
error
==
DECODE_ERROR_NOERROR
)
{
if
(
dc
.
error
!=
DECODE_ERROR_NOERROR
)
{
/* the decoder failed */
assert
(
dc
.
next_song
==
NULL
||
dc
.
next_song
->
url
!=
NULL
);
pc
.
errored_song
=
dc
.
next_song
;
pc
.
error
=
PLAYER_ERROR_FILE
;
break
;
}
else
if
(
dc
.
state
!=
DECODE_STATE_START
)
{
/* the decoder is ready and ok */
decodeWaitedOn
=
0
;
if
(
openAudioDevice
(
&
(
ob
.
audioFormat
))
<
0
)
{
...
...
@@ -242,13 +248,6 @@ static void decodeParent(void)
pc
.
channels
=
dc
.
audioFormat
.
channels
;
sizeToTime
=
audioFormatSizeToTime
(
&
ob
.
audioFormat
);
}
else
if
(
dc
.
state
!=
DECODE_STATE_START
)
{
/* the decoder failed */
assert
(
dc
.
next_song
==
NULL
||
dc
.
next_song
->
url
!=
NULL
);
pc
.
errored_song
=
dc
.
next_song
;
pc
.
error
=
PLAYER_ERROR_FILE
;
break
;
}
else
{
/* the decoder is not yet ready; wait
some more */
...
...
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