diff options
Diffstat (limited to 'src/inputPlugins/audiofile_plugin.c')
-rw-r--r-- | src/inputPlugins/audiofile_plugin.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/inputPlugins/audiofile_plugin.c b/src/inputPlugins/audiofile_plugin.c index 8527a47a9..b5555f87d 100644 --- a/src/inputPlugins/audiofile_plugin.c +++ b/src/inputPlugins/audiofile_plugin.c @@ -33,16 +33,16 @@ static int getAudiofileTotalTime(char *file) { - int time; + int total_time; AFfilehandle af_fp = afOpenFile(file, "r", NULL); if (af_fp == AF_NULL_FILEHANDLE) { return -1; } - time = (int) + total_time = (int) ((double)afGetFrameCount(af_fp, AF_DEFAULT_TRACK) / afGetRate(af_fp, AF_DEFAULT_TRACK)); afCloseFile(af_fp); - return time; + return total_time; } static int audiofile_decode(OutputBuffer * cb, DecoderControl * dc, char *path) @@ -134,12 +134,12 @@ static int audiofile_decode(OutputBuffer * cb, DecoderControl * dc, char *path) static MpdTag *audiofileTagDup(char *file) { MpdTag *ret = NULL; - int time = getAudiofileTotalTime(file); + int total_time = getAudiofileTotalTime(file); - if (time >= 0) { + if (total_time >= 0) { if (!ret) ret = newMpdTag(); - ret->time = time; + ret->time = total_time; } else { DEBUG ("audiofileTagDup: Failed to get total song time from: %s\n", |