From 173b3cc28d40f7555d0f7dbf1cc8823f81762fdb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:12 +0200 Subject: 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. --- src/inputPlugins/mp3_plugin.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/inputPlugins') 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; -- cgit v1.2.3