aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/aac_plugin.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-04-12 04:16:32 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:16:32 +0000
commitf275a1a1abf353873ce85c5c66b2be7c51d317a5 (patch)
treed4be50e4a404dbcf7d6ba405ad3b7e91671c4ad0 /src/inputPlugins/aac_plugin.c
parent4e4441fd32e694753824a543c050e5d3c0b49a5a (diff)
downloadmpd-f275a1a1abf353873ce85c5c66b2be7c51d317a5.tar.gz
mpd-f275a1a1abf353873ce85c5c66b2be7c51d317a5.tar.xz
mpd-f275a1a1abf353873ce85c5c66b2be7c51d317a5.zip
Fix a few more warnings from -Wshadow
git-svn-id: https://svn.musicpd.org/mpd/trunk@7300 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/aac_plugin.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/inputPlugins/aac_plugin.c b/src/inputPlugins/aac_plugin.c
index 5d8eb74f3..2962b57c6 100644
--- a/src/inputPlugins/aac_plugin.c
+++ b/src/inputPlugins/aac_plugin.c
@@ -273,18 +273,18 @@ static float getAacFloatTotalTime(char *file)
static int getAacTotalTime(char *file)
{
- int time = -1;
+ int file_time = -1;
float length;
if ((length = getAacFloatTotalTime(file)) >= 0)
- time = length + 0.5;
+ file_time = length + 0.5;
- return time;
+ return file_time;
}
static int aac_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
{
- float time;
+ float file_time;
float totalTime;
faacDecHandle decoder;
faacDecFrameInfo frameInfo;
@@ -343,7 +343,7 @@ static int aac_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
dc->totalTime = totalTime;
- time = 0.0;
+ file_time = 0.0;
advanceAacBuffer(&b, bread);
@@ -388,7 +388,7 @@ static int aac_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
bitRate = frameInfo.bytesconsumed * 8.0 *
frameInfo.channels * sampleRate /
frameInfo.samples / 1000 + 0.5;
- time +=
+ file_time +=
(float)(frameInfo.samples) / frameInfo.channels /
sampleRate;
}
@@ -396,7 +396,8 @@ static int aac_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
sampleBufferLen = sampleCount * 2;
sendDataToOutputBuffer(cb, NULL, dc, 0, sampleBuffer,
- sampleBufferLen, time, bitRate, NULL);
+ sampleBufferLen, file_time,
+ bitRate, NULL);
if (dc->seek) {
dc->seekError = 1;
dc->seek = 0;
@@ -428,14 +429,12 @@ static int aac_decode(OutputBuffer * cb, DecoderControl * dc, char *path)
static MpdTag *aacTagDup(char *file)
{
MpdTag *ret = NULL;
- int time;
+ int file_time = getAacTotalTime(file);
- time = getAacTotalTime(file);
-
- if (time >= 0) {
+ if (file_time >= 0) {
if ((ret = id3Dup(file)) == NULL)
ret = newMpdTag();
- ret->time = time;
+ ret->time = file_time;
} else {
DEBUG("aacTagDup: Failed to get total song time from: %s\n",
file);