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-28 20:15:14 +0900 |
commit | c7cebfde022d5b255e9c478bcf83391da952dbe8 (patch) | |
tree | b2ef4ba5c6d57d0d83c16c7718c673510083fcbb | |
parent | c36f152deec6e4f3c57e57fc6606742a5ba7c703 (diff) | |
download | tdemultimedia-c7cebfde022d5b255e9c478bcf83391da952dbe8.tar.gz tdemultimedia-c7cebfde022d5b255e9c478bcf83391da952dbe8.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>
(cherry picked from commit 87208f36caa2451854e949bc270068d2712ebfc4)
-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 { |