aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/MadDecoderPlugin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder/plugins/MadDecoderPlugin.cxx')
-rw-r--r--src/decoder/plugins/MadDecoderPlugin.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx
index 3175d4bf6..8c9707b89 100644
--- a/src/decoder/plugins/MadDecoderPlugin.cxx
+++ b/src/decoder/plugins/MadDecoderPlugin.cxx
@@ -1094,11 +1094,9 @@ mad_decoder_scan_stream(InputStream &is,
if (!result.first)
return false;
- unsigned duration = result.second.IsNegative()
- ? 0
- : result.second.RoundS();
-
- tag_handler_invoke_duration(handler, handler_ctx, duration);
+ if (!result.second.IsNegative())
+ tag_handler_invoke_duration(handler, handler_ctx,
+ SongTime(result.second));
return true;
}