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
06c60888
Commit
06c60888
authored
Nov 11, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpc: eliminated the local variable "eof"
Since each "eof=true" is followed by "break", the variable is superfluous.
parent
97080b79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
mpc_plugin.c
src/decoder/mpc_plugin.c
+3
-8
No files found.
src/decoder/mpc_plugin.c
View file @
06c60888
...
@@ -108,7 +108,6 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
...
@@ -108,7 +108,6 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
MPC_SAMPLE_FORMAT
sample_buffer
[
MPC_DECODER_BUFFER_LENGTH
];
MPC_SAMPLE_FORMAT
sample_buffer
[
MPC_DECODER_BUFFER_LENGTH
];
bool
eof
=
false
;
long
ret
;
long
ret
;
#define MPC_CHUNK_SIZE 4096
#define MPC_CHUNK_SIZE 4096
char
chunk
[
MPC_CHUNK_SIZE
];
char
chunk
[
MPC_CHUNK_SIZE
];
...
@@ -162,7 +161,7 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
...
@@ -162,7 +161,7 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
inStream
->
seekable
,
inStream
->
seekable
,
mpc_streaminfo_get_length
(
&
info
));
mpc_streaminfo_get_length
(
&
info
));
while
(
!
eof
)
{
while
(
true
)
{
if
(
decoder_get_command
(
mpd_decoder
)
==
DECODE_COMMAND_SEEK
)
{
if
(
decoder_get_command
(
mpd_decoder
)
==
DECODE_COMMAND_SEEK
)
{
samplePos
=
decoder_seek_where
(
mpd_decoder
)
*
samplePos
=
decoder_seek_where
(
mpd_decoder
)
*
audio_format
.
sample_rate
;
audio_format
.
sample_rate
;
...
@@ -179,10 +178,8 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
...
@@ -179,10 +178,8 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
ret
=
mpc_decoder_decode
(
&
decoder
,
sample_buffer
,
ret
=
mpc_decoder_decode
(
&
decoder
,
sample_buffer
,
&
vbrUpdateAcc
,
&
vbrUpdateBits
);
&
vbrUpdateAcc
,
&
vbrUpdateBits
);
if
(
ret
<=
0
||
decoder_get_command
(
mpd_decoder
)
==
DECODE_COMMAND_STOP
)
{
if
(
ret
<=
0
||
decoder_get_command
(
mpd_decoder
)
==
DECODE_COMMAND_STOP
)
eof
=
true
;
break
;
break
;
}
samplePos
+=
ret
;
samplePos
+=
ret
;
...
@@ -207,10 +204,8 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
...
@@ -207,10 +204,8 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
chunkpos
=
0
;
chunkpos
=
0
;
dest
=
(
int32_t
*
)
chunk
;
dest
=
(
int32_t
*
)
chunk
;
if
(
decoder_get_command
(
mpd_decoder
)
==
DECODE_COMMAND_STOP
)
{
if
(
decoder_get_command
(
mpd_decoder
)
==
DECODE_COMMAND_STOP
)
eof
=
true
;
break
;
break
;
}
}
}
}
}
}
}
...
...
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