mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
stream: don't require streams to set s->pos in seek callback
Instead, set s->pos depending on the success of the seek callback.
This commit is contained in:
@@ -76,8 +76,7 @@ static int control(stream_t *s, int cmd, void *arg) {
|
||||
|
||||
static int seek(stream_t *s,int64_t newpos) {
|
||||
struct priv *p = s->priv;
|
||||
s->pos = newpos;
|
||||
if(smbc_lseek(p->fd,s->pos,SEEK_SET)<0) {
|
||||
if(smbc_lseek(p->fd,newpos,SEEK_SET)<0) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user