aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/decoder/plugins/FaadDecoderPlugin.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/decoder/plugins/FaadDecoderPlugin.cxx b/src/decoder/plugins/FaadDecoderPlugin.cxx
index 85bb69ad9..90e5dc40f 100644
--- a/src/decoder/plugins/FaadDecoderPlugin.cxx
+++ b/src/decoder/plugins/FaadDecoderPlugin.cxx
@@ -219,11 +219,10 @@ faad_song_duration(DecoderBuffer *buffer, InputStream &is)
(data.data[7 + skip_size] & 0xE0);
const auto size = is.GetSize();
- const size_t fileread = size >= 0 ? size : 0;
if (bit_rate != 0)
- return fileread * 8.0 / bit_rate;
+ return size * 8.0 / bit_rate;
else
- return fileread;
+ return size;
} else
return -1;
}