diff options
author | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:12 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:12 +0200 |
commit | e4c6c01903038d3d308fad2b10f5133b49abe724 (patch) | |
tree | d82511e49545b993e65ec24ad2fc48a188329b71 /src | |
parent | 60a155624c904463df48c5920dc2d096e3ce612d (diff) | |
download | mpd-e4c6c01903038d3d308fad2b10f5133b49abe724.tar.gz mpd-e4c6c01903038d3d308fad2b10f5133b49abe724.tar.xz mpd-e4c6c01903038d3d308fad2b10f5133b49abe724.zip |
mp3: make samplesPerFrame more local
The variable samplesPerFrame is used only in one single closure. Make
it local to this closure. The compiler will probably convert it to a
register anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/inputPlugins/mp3_plugin.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index 09c93506a..7eb527e6d 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -839,7 +839,6 @@ static int openMp3FromInputStream(InputStream * inStream, mp3DecodeData * data, static int mp3Read(mp3DecodeData * data, struct decoder *decoder, ReplayGainInfo ** replayGainInfo) { - unsigned int samplesPerFrame; unsigned int samplesLeft; unsigned int i; int ret; @@ -886,7 +885,7 @@ static int mp3Read(mp3DecodeData * data, struct decoder *decoder, mad_synth_frame(&data->synth, &data->frame); if (!data->foundFirstFrame) { - samplesPerFrame = (data->synth).pcm.length; + unsigned int samplesPerFrame = (data->synth).pcm.length; data->dropFramesAtStart = data->dropSamplesAtStart / samplesPerFrame; data->dropFramesAtEnd = data->dropSamplesAtEnd / samplesPerFrame; data->dropSamplesAtStart = data->dropSamplesAtStart % samplesPerFrame; |