diff options
author | Max Kellermann <max@duempel.org> | 2014-08-29 21:20:16 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-29 21:38:08 +0200 |
commit | 7556abb92d8743297c3a6faeb8a388265a850d8c (patch) | |
tree | e59577d3a115bc34551d2df4822cae556f2406be /src/decoder/plugins | |
parent | 9d3a85d434892055e5a640338a002504a26eabb0 (diff) | |
download | mpd-7556abb92d8743297c3a6faeb8a388265a850d8c.tar.gz mpd-7556abb92d8743297c3a6faeb8a388265a850d8c.tar.xz mpd-7556abb92d8743297c3a6faeb8a388265a850d8c.zip |
decoder/faad: bit_rate==0 is an error
Diffstat (limited to 'src/decoder/plugins')
-rw-r--r-- | src/decoder/plugins/FaadDecoderPlugin.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |