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
acb265d0
Commit
acb265d0
authored
Nov 03, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player_thread: don't start the decoder asynchronously
The START command returns without blocking; we don't need the asynchronous decoder start anymore.
parent
77a647fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
17 deletions
+2
-17
decoder_control.c
src/decoder_control.c
+0
-10
decoder_control.h
src/decoder_control.h
+0
-3
player_thread.c
src/player_thread.c
+2
-4
No files found.
src/decoder_control.c
View file @
acb265d0
...
...
@@ -94,16 +94,6 @@ dc_start(struct decoder_control *dc, struct song *song)
}
void
dc_start_async
(
struct
decoder_control
*
dc
,
struct
song
*
song
)
{
assert
(
dc
->
pipe
!=
NULL
);
assert
(
song
!=
NULL
);
dc
->
next_song
=
song
;
dc_command_async
(
dc
,
DECODE_COMMAND_START
);
}
void
dc_stop
(
struct
decoder_control
*
dc
)
{
decoder_lock
(
dc
);
...
...
src/decoder_control.h
View file @
acb265d0
...
...
@@ -212,9 +212,6 @@ void
dc_start
(
struct
decoder_control
*
dc
,
struct
song
*
song
);
void
dc_start_async
(
struct
decoder_control
*
dc
,
struct
song
*
song
);
void
dc_stop
(
struct
decoder_control
*
dc
);
bool
...
...
src/player_thread.c
View file @
acb265d0
...
...
@@ -159,8 +159,6 @@ player_wait_for_decoder(struct player *player)
{
struct
decoder_control
*
dc
=
player
->
dc
;
dc_command_wait
(
dc
);
if
(
decoder_lock_has_failed
(
dc
))
{
assert
(
dc
->
next_song
==
NULL
||
dc
->
next_song
->
uri
!=
NULL
);
...
...
@@ -331,7 +329,7 @@ static bool player_seek_decoder(struct player *player)
dc
->
pipe
=
player
->
pipe
;
/* re-start the decoder */
dc_start
_async
(
dc
,
pc
.
next_song
);
dc_start
(
dc
,
pc
.
next_song
);
ret
=
player_wait_for_decoder
(
player
);
if
(
!
ret
)
{
/* decoder failure */
...
...
@@ -793,7 +791,7 @@ static void do_play(struct decoder_control *dc)
player
.
queued
=
false
;
dc
->
pipe
=
music_pipe_new
();
dc_start
_async
(
dc
,
pc
.
next_song
);
dc_start
(
dc
,
pc
.
next_song
);
}
if
(
dc
->
pipe
!=
NULL
&&
dc
->
pipe
!=
player
.
pipe
&&
...
...
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