diff options
author | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:12 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-08-30 19:23:51 -0700 |
commit | 173b3cc28d40f7555d0f7dbf1cc8823f81762fdb (patch) | |
tree | 154a46c75f16ee9c38930236bf3b216bb9140820 /src | |
parent | 70bf8cfa27ed88bd01ace37949599ef5680aa6c5 (diff) | |
download | mpd-173b3cc28d40f7555d0f7dbf1cc8823f81762fdb.tar.gz mpd-173b3cc28d40f7555d0f7dbf1cc8823f81762fdb.tar.xz mpd-173b3cc28d40f7555d0f7dbf1cc8823f81762fdb.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 000a4c688..8213dbc0b 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -861,7 +861,6 @@ static void mp3Read_seek(mp3DecodeData * data) static int mp3Read(mp3DecodeData * data, ReplayGainInfo ** replayGainInfo) { - unsigned int samplesPerFrame; unsigned int samplesLeft; unsigned int i; int ret; @@ -911,7 +910,7 @@ static int mp3Read(mp3DecodeData * data, ReplayGainInfo ** replayGainInfo) 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; |