From ca252804c6bbba163fe00d660f47ca4856e4874e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2014 12:44:54 +0200 Subject: DecoderControl: use SignedSongTime for the song duration --- src/decoder/DecoderAPI.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/decoder/DecoderAPI.cxx') diff --git a/src/decoder/DecoderAPI.cxx b/src/decoder/DecoderAPI.cxx index f34894b6a..bccd46b17 100644 --- a/src/decoder/DecoderAPI.cxx +++ b/src/decoder/DecoderAPI.cxx @@ -59,7 +59,9 @@ decoder_initialized(Decoder &decoder, dc.out_audio_format = getOutputAudioFormat(audio_format); dc.seekable = seekable; - dc.total_time = total_time; + dc.total_time = total_time > 0 + ? SignedSongTime::FromS(total_time) + : SignedSongTime::Negative(); FormatDebug(decoder_domain, "audio_format=%s, seekable=%s", audio_format_to_string(dc.in_audio_format, &af_string), -- cgit v1.2.3