From 5397d18ed9680a4d09427dffcd2f994a31828ea5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 10 Feb 2020 09:18:37 +0100 Subject: [PATCH] protocol/ArgParser: cast seek offset to SignedSongTime "The issue is that ParseCommandArgSignedSongTime parses with SongTime::FromS, not SignedSongTime::FromS, before casting back to a SignedSongTime for the return. With x86 overflow rules this doesn't matter, but on ARM the first cast turns negative values to zero." Closes https://github.com/MusicPlayerDaemon/MPD/issues/757 --- NEWS | 1 + src/protocol/ArgParser.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 32a4eed6e..92204f996 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ver 0.21.20 (not yet released) - audiofile, ffmpeg, sndfile: handle MIME type "audio/wav" - ffmpeg: fix playback of AIFF and TTA - vorbis, opus: fix seeking in small files +* fix backwards seeking on ARM (and other non-x86 CPUs) ver 0.21.19 (2020/01/17) * configuration diff --git a/src/protocol/ArgParser.cxx b/src/protocol/ArgParser.cxx index b162c1984..fdd2b4a5d 100644 --- a/src/protocol/ArgParser.cxx +++ b/src/protocol/ArgParser.cxx @@ -175,5 +175,5 @@ SignedSongTime ParseCommandArgSignedSongTime(const char *s) { auto value = ParseCommandArgFloat(s); - return SongTime::FromS(value); + return SignedSongTime::FromS(value); }