diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2021-08-27 02:30:18 +0200 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-08-27 19:47:27 +0900 |
commit | 87208f36caa2451854e949bc270068d2712ebfc4 (patch) | |
tree | 7e029c3dc70bbe57fb8c22078bffbb88cb907e38 /akode_artsplugin | |
parent | 3f4c9f176ab1d09de1e84ca21cade5b0639d7c3f (diff) | |
download | tdemultimedia-87208f36caa2451854e949bc270068d2712ebfc4.tar.gz tdemultimedia-87208f36caa2451854e949bc270068d2712ebfc4.zip |
Update akode seek method semantics.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'akode_artsplugin')
-rw-r--r-- | akode_artsplugin/arts_inputstream.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/akode_artsplugin/arts_inputstream.h b/akode_artsplugin/arts_inputstream.h index 1f68d177..785378cb 100644 --- a/akode_artsplugin/arts_inputstream.h +++ b/akode_artsplugin/arts_inputstream.h @@ -75,8 +75,8 @@ public: long write(const char*, long) { return -1; } - bool seek(long to, int whence) { - if(!m_open || !seekable()) return false; + ssize_t seek(long to, int whence) { + if(!m_open || !seekable()) return -1; arts_debug("akode: InputStream seeking"); @@ -89,21 +89,21 @@ public: newpos = m_pos + to; break; case SEEK_END: - if (m_len < 0) return false; + if (m_len < 0) return -1; newpos = m_len + to; break; default: - return false; + return -1; } - long s = m_instream.seek(newpos); + ssize_t s = m_instream.seek(newpos); if (s >= 0) { m_pos = s; m_buffer->flush(); - return true; + return s; } else - return false; + return -1; } long position() const { |