summaryrefslogtreecommitdiffstats
path: root/akode_artsplugin
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-08-27 02:30:18 +0200
committerMichele Calgaro <michele.calgaro@yahoo.it>2021-08-27 19:47:27 +0900
commit87208f36caa2451854e949bc270068d2712ebfc4 (patch)
tree7e029c3dc70bbe57fb8c22078bffbb88cb907e38 /akode_artsplugin
parent3f4c9f176ab1d09de1e84ca21cade5b0639d7c3f (diff)
downloadtdemultimedia-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.h14
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 {