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
347e8162
Commit
347e8162
authored
Oct 31, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder: reset state and command in decoder_task()
Eliminate one goto in decodeStart() by moving some cleanup to decoder_task().
parent
86fbac54
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
decoder_thread.c
src/decoder_thread.c
+4
-4
No files found.
src/decoder_thread.c
View file @
347e8162
...
...
@@ -46,7 +46,7 @@ static void decodeStart(void)
dc
.
current_song
=
dc
.
next_song
;
/* NEED LOCK */
if
(
!
input_stream_open
(
&
inStream
,
path_max_fs
))
{
dc
.
error
=
DECODE_ERROR_FILE
;
goto
stop_no_close
;
return
;
}
decoder
.
seeking
=
false
;
...
...
@@ -159,9 +159,6 @@ static void decodeStart(void)
stop:
if
(
close_instream
)
input_stream_close
(
&
inStream
);
stop_no_close:
dc
.
state
=
DECODE_STATE_STOP
;
dc
.
command
=
DECODE_COMMAND_NONE
;
}
static
void
*
decoder_task
(
mpd_unused
void
*
arg
)
...
...
@@ -173,6 +170,9 @@ static void * decoder_task(mpd_unused void *arg)
case
DECODE_COMMAND_START
:
case
DECODE_COMMAND_SEEK
:
decodeStart
();
dc
.
state
=
DECODE_STATE_STOP
;
dc
.
command
=
DECODE_COMMAND_NONE
;
break
;
case
DECODE_COMMAND_STOP
:
...
...
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