diff options
author | Max Kellermann <max@duempel.org> | 2008-11-12 08:21:00 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-12 08:21:00 +0100 |
commit | 35a4ca24211c3e85ed9827c7e687c0cb38b0f3f0 (patch) | |
tree | ddd6a249f9dcae95aa8d4dda8c9eb564ec3a6c70 | |
parent | 39fa60769c10311c175a70aa2fdc5e13717529f6 (diff) | |
download | mpd-35a4ca24211c3e85ed9827c7e687c0cb38b0f3f0.tar.gz mpd-35a4ca24211c3e85ed9827c7e687c0cb38b0f3f0.tar.xz mpd-35a4ca24211c3e85ed9827c7e687c0cb38b0f3f0.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/decoder/aac_plugin.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/decoder/aac_plugin.c b/src/decoder/aac_plugin.c index e26af8063..8990fa1ab 100644 --- a/src/decoder/aac_plugin.c +++ b/src/decoder/aac_plugin.c @@ -311,7 +311,6 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream) faacDecFrameInfo frameInfo; faacDecConfigurationPtr config; long bread; - struct audio_format audio_format; uint32_t sample_rate; unsigned char channels; unsigned int sampleCount; @@ -359,8 +358,6 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream) return; } - audio_format.bits = 16; - file_time = 0.0; advanceAacBuffer(&b, bread); @@ -391,8 +388,12 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream) #endif if (!initialized) { - audio_format.channels = frameInfo.channels; - audio_format.sample_rate = sample_rate; + const struct audio_format audio_format = { + .bits = 16, + .channels = frameInfo.channels, + .sample_rate = sample_rate, + }; + decoder_initialized(mpd_decoder, &audio_format, false, totalTime); initialized = true; |