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
4aca1fa4
Commit
4aca1fa4
authored
Feb 17, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
faad: variable cleanup
Make some variables more local, and eliminate superfluous ones.
parent
122e0f33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
faad_plugin.c
src/decoder/faad_plugin.c
+4
-9
No files found.
src/decoder/faad_plugin.c
View file @
4aca1fa4
...
@@ -370,12 +370,8 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is)
...
@@ -370,12 +370,8 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is)
float
total_time
=
0
;
float
total_time
=
0
;
faacDecHandle
decoder
;
faacDecHandle
decoder
;
struct
audio_format
audio_format
;
struct
audio_format
audio_format
;
faacDecFrameInfo
frame_info
;
faacDecConfigurationPtr
config
;
faacDecConfigurationPtr
config
;
unsigned
long
sample_count
;
bool
ret
;
bool
ret
;
const
void
*
decoded
;
size_t
decoded_length
;
uint16_t
bit_rate
=
0
;
uint16_t
bit_rate
=
0
;
struct
decoder_buffer
*
buffer
;
struct
decoder_buffer
*
buffer
;
enum
decoder_command
cmd
;
enum
decoder_command
cmd
;
...
@@ -430,6 +426,8 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is)
...
@@ -430,6 +426,8 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is)
do
{
do
{
size_t
frame_size
;
size_t
frame_size
;
const
void
*
decoded
;
faacDecFrameInfo
frame_info
;
/* find the next frame */
/* find the next frame */
...
@@ -467,8 +465,7 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is)
...
@@ -467,8 +465,7 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is)
/* update bit rate and position */
/* update bit rate and position */
sample_count
=
(
unsigned
long
)
frame_info
.
samples
;
if
(
frame_info
.
samples
>
0
)
{
if
(
sample_count
>
0
)
{
bit_rate
=
frame_info
.
bytesconsumed
*
8
.
0
*
bit_rate
=
frame_info
.
bytesconsumed
*
8
.
0
*
frame_info
.
channels
*
audio_format
.
sample_rate
/
frame_info
.
channels
*
audio_format
.
sample_rate
/
frame_info
.
samples
/
1000
+
0
.
5
;
frame_info
.
samples
/
1000
+
0
.
5
;
...
@@ -479,10 +476,8 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is)
...
@@ -479,10 +476,8 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is)
/* send PCM samples to MPD */
/* send PCM samples to MPD */
decoded_length
=
sample_count
*
2
;
cmd
=
decoder_data
(
mpd_decoder
,
is
,
decoded
,
cmd
=
decoder_data
(
mpd_decoder
,
is
,
decoded
,
decoded_length
,
file_time
,
(
size_t
)
frame_info
.
samples
*
2
,
file_time
,
bit_rate
,
NULL
);
bit_rate
,
NULL
);
}
while
(
cmd
!=
DECODE_COMMAND_STOP
);
}
while
(
cmd
!=
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