summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-31 22:25:06 +0200
committerwm4 <wm4@nowhere>2016-08-31 22:25:06 +0200
commitec3c428e5fb03244b9f8f4f7432779b45a181166 (patch)
treedf5d98e1f5768b27d0ed862eb6c592b88cb8e946 /stream
parente22ae2cba0cbca7c773e9ac29e57c48b689fae41 (diff)
downloadmpv-ec3c428e5fb03244b9f8f4f7432779b45a181166.tar.bz2
mpv-ec3c428e5fb03244b9f8f4f7432779b45a181166.tar.xz
stream_cb: remove broken cast
seek_fn is supposed to return the new file offset, or a negative error code. Our code doesn't use the offset, and only wants to know if any errors happened. The int cast is completely broken and might treat a successful seek as failed depending on whether the sign bit will be set.
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_cb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_cb.c b/stream/stream_cb.c
index 4496e63255..fdef517bb8 100644
--- a/stream/stream_cb.c
+++ b/stream/stream_cb.c
@@ -31,7 +31,7 @@ static int fill_buffer(stream_t *s, char *buffer, int max_len)
static int seek(stream_t *s, int64_t newpos)
{
struct priv *p = s->priv;
- return (int)p->info.seek_fn(p->info.cookie, newpos) >= 0;
+ return p->info.seek_fn(p->info.cookie, newpos) >= 0;
}
static int control(stream_t *s, int cmd, void *arg)