Commit 5397d18e authored by Max Kellermann's avatar Max Kellermann

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
parent 42eb69f4
...@@ -3,6 +3,7 @@ ver 0.21.20 (not yet released) ...@@ -3,6 +3,7 @@ ver 0.21.20 (not yet released)
- audiofile, ffmpeg, sndfile: handle MIME type "audio/wav" - audiofile, ffmpeg, sndfile: handle MIME type "audio/wav"
- ffmpeg: fix playback of AIFF and TTA - ffmpeg: fix playback of AIFF and TTA
- vorbis, opus: fix seeking in small files - vorbis, opus: fix seeking in small files
* fix backwards seeking on ARM (and other non-x86 CPUs)
ver 0.21.19 (2020/01/17) ver 0.21.19 (2020/01/17)
* configuration * configuration
......
...@@ -175,5 +175,5 @@ SignedSongTime ...@@ -175,5 +175,5 @@ SignedSongTime
ParseCommandArgSignedSongTime(const char *s) ParseCommandArgSignedSongTime(const char *s)
{ {
auto value = ParseCommandArgFloat(s); auto value = ParseCommandArgFloat(s);
return SongTime::FromS(value); return SignedSongTime::FromS(value);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment