decoder/faad: remove unnecessary cast to size_t

This commit is contained in:
Max Kellermann 2014-08-19 20:40:11 +02:00
parent 43a1a0f3ab
commit 52edabf2cb

View File

@ -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;
}