From 7556abb92d8743297c3a6faeb8a388265a850d8c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2014 21:20:16 +0200 Subject: decoder/faad: bit_rate==0 is an error --- src/decoder/plugins/FaadDecoderPlugin.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/decoder/plugins') diff --git a/src/decoder/plugins/FaadDecoderPlugin.cxx b/src/decoder/plugins/FaadDecoderPlugin.cxx index 90e5dc40f..83fab7f9e 100644 --- a/src/decoder/plugins/FaadDecoderPlugin.cxx +++ b/src/decoder/plugins/FaadDecoderPlugin.cxx @@ -219,10 +219,10 @@ faad_song_duration(DecoderBuffer *buffer, InputStream &is) (data.data[7 + skip_size] & 0xE0); const auto size = is.GetSize(); - if (bit_rate != 0) - return size * 8.0 / bit_rate; - else - return size; + if (bit_rate == 0) + return -1; + + return size * 8.0 / bit_rate; } else return -1; } -- cgit v1.2.3