mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
e22ae2cba0
commit
ec3c428e5f
|
@ -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)
|
static int seek(stream_t *s, int64_t newpos)
|
||||||
{
|
{
|
||||||
struct priv *p = s->priv;
|
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)
|
static int control(stream_t *s, int cmd, void *arg)
|
||||||
|
|
Loading…
Reference in New Issue