Commit 7556abb9 authored by Max Kellermann's avatar Max Kellermann

decoder/faad: bit_rate==0 is an error

parent 9d3a85d4
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment