diff options
Diffstat (limited to '')
-rw-r--r-- | src/decoder/plugins/MadDecoderPlugin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx index 886aa1795..e38fe3f29 100644 --- a/src/decoder/plugins/MadDecoderPlugin.cxx +++ b/src/decoder/plugins/MadDecoderPlugin.cxx @@ -769,9 +769,9 @@ MadDecoder::RestIncludingThisFrame() const inline void MadDecoder::FileSizeToSongLength() { - InputStream::offset_type rest = RestIncludingThisFrame(); + if (input_stream.KnownSize()) { + InputStream::offset_type rest = RestIncludingThisFrame(); - if (rest > 0) { float frame_duration = mp3_frame_duration(&frame); total_time = (rest * 8.0) / frame.header.bitrate; |