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
39c5af5d
Commit
39c5af5d
authored
Jan 10, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder_thread: move code to decoder_command_finished_locked()
parent
acca6a79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
decoder_thread.c
src/decoder_thread.c
+19
-8
No files found.
src/decoder_thread.c
View file @
39c5af5d
...
...
@@ -55,6 +55,22 @@ decoder_lock_get_command(struct decoder_control *dc)
}
/**
* Marks the current decoder command as "finished" and notifies the
* player thread.
*
* @param dc the #decoder_control object; must be locked
*/
static
void
decoder_command_finished_locked
(
struct
decoder_control
*
dc
)
{
assert
(
dc
->
command
!=
DECODE_COMMAND_NONE
);
dc
->
command
=
DECODE_COMMAND_NONE
;
player_signal
(
dc
->
player_control
);
}
/**
* Opens the input stream with input_stream_open(), and waits until
* the stream gets ready. If a decoder STOP command is received
* during that, it cancels the operation (but does not close the
...
...
@@ -381,9 +397,8 @@ decoder_run_song(struct decoder_control *dc,
decoder
.
chunk
=
NULL
;
dc
->
state
=
DECODE_STATE_START
;
dc
->
command
=
DECODE_COMMAND_NONE
;
player_signal
(
dc
->
player_control
);
decoder_command_finished_locked
(
dc
);
pcm_convert_init
(
&
decoder
.
conv_state
);
...
...
@@ -462,15 +477,11 @@ decoder_task(gpointer arg)
case
DECODE_COMMAND_SEEK
:
decoder_run
(
dc
);
dc
->
command
=
DECODE_COMMAND_NONE
;
player_signal
(
dc
->
player_control
);
decoder_command_finished_locked
(
dc
);
break
;
case
DECODE_COMMAND_STOP
:
dc
->
command
=
DECODE_COMMAND_NONE
;
player_signal
(
dc
->
player_control
);
decoder_command_finished_locked
(
dc
);
break
;
case
DECODE_COMMAND_NONE
:
...
...
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