From 3158955198fbdc71319cd3418523d851e6d47106 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2014 22:43:36 +0200 Subject: TagHandler: pass SongTime to duration() --- src/decoder/plugins/MadDecoderPlugin.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/decoder/plugins/MadDecoderPlugin.cxx') 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; } -- cgit v1.2.3