aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/aac_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/aac_plugin.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/inputPlugins/aac_plugin.c b/src/inputPlugins/aac_plugin.c
index 8f7f83a9f..3213bb68f 100644
--- a/src/inputPlugins/aac_plugin.c
+++ b/src/inputPlugins/aac_plugin.c
@@ -223,9 +223,10 @@ static void initAacBuffer(InputStream * inStream, AacBuffer * b, float *length,
skipSize]
& 0xE0);
- *length = fileread;
- if (*length != 0 && bitRate != 0)
- *length = *length * 8.0 / bitRate;
+ if (fileread != 0 && bitRate != 0)
+ *length = fileread * 8.0 / bitRate;
+ else
+ *length = fileread;
}
}