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
35a4ca24
Commit
35a4ca24
authored
Nov 12, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aac: convert audio_format to temporary variable
The audio_format variable is only used and initialized for decoder_initialized(). Move it into that block to save some bytes on the stack.
parent
39fa6076
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
aac_plugin.c
src/decoder/aac_plugin.c
+6
-5
No files found.
src/decoder/aac_plugin.c
View file @
35a4ca24
...
@@ -311,7 +311,6 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
...
@@ -311,7 +311,6 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
faacDecFrameInfo
frameInfo
;
faacDecFrameInfo
frameInfo
;
faacDecConfigurationPtr
config
;
faacDecConfigurationPtr
config
;
long
bread
;
long
bread
;
struct
audio_format
audio_format
;
uint32_t
sample_rate
;
uint32_t
sample_rate
;
unsigned
char
channels
;
unsigned
char
channels
;
unsigned
int
sampleCount
;
unsigned
int
sampleCount
;
...
@@ -359,8 +358,6 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
...
@@ -359,8 +358,6 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
return
;
return
;
}
}
audio_format
.
bits
=
16
;
file_time
=
0
.
0
;
file_time
=
0
.
0
;
advanceAacBuffer
(
&
b
,
bread
);
advanceAacBuffer
(
&
b
,
bread
);
...
@@ -391,8 +388,12 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
...
@@ -391,8 +388,12 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
#endif
#endif
if
(
!
initialized
)
{
if
(
!
initialized
)
{
audio_format
.
channels
=
frameInfo
.
channels
;
const
struct
audio_format
audio_format
=
{
audio_format
.
sample_rate
=
sample_rate
;
.
bits
=
16
,
.
channels
=
frameInfo
.
channels
,
.
sample_rate
=
sample_rate
,
};
decoder_initialized
(
mpd_decoder
,
&
audio_format
,
decoder_initialized
(
mpd_decoder
,
&
audio_format
,
false
,
totalTime
);
false
,
totalTime
);
initialized
=
true
;
initialized
=
true
;
...
...
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