aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-19 20:40:11 +0200
committerMax Kellermann <max@duempel.org>2014-08-19 20:44:29 +0200
commit52edabf2cbcea64de4e176d9f5de916f572e97c0 (patch)
tree34aee52827bc352049e84a7cc49444db6c75bb9e /src/decoder/plugins
parent43a1a0f3abaa553fcff0c38986205ed717863c2a (diff)
downloadmpd-52edabf2cbcea64de4e176d9f5de916f572e97c0.tar.gz
mpd-52edabf2cbcea64de4e176d9f5de916f572e97c0.tar.xz
mpd-52edabf2cbcea64de4e176d9f5de916f572e97c0.zip
decoder/faad: remove unnecessary cast to size_t
Diffstat (limited to 'src/decoder/plugins')
-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;
}