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.
---

 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 09c9350..7eb527e 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;


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to