summaryrefslogtreecommitdiffstats
path: root/stream/stream_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_file.c')
-rw-r--r--stream/stream_file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c
index c714f5739d..528cf1a6e3 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -96,9 +96,10 @@ static int control(stream_t *s, int cmd, void *arg)
size = lseek(p->fd, 0, SEEK_END);
lseek(p->fd, s->pos, SEEK_SET);
if (size != (off_t)-1) {
- *(uint64_t *)arg = size;
+ *(int64_t *)arg = size;
return 1;
}
+ break;
}
}
return STREAM_UNSUPPORTED;
@@ -276,10 +277,10 @@ static int open_f(stream_t *stream, int mode)
len = -1;
#endif
stream->type = STREAMTYPE_FILE;
- stream->flags = MP_STREAM_FAST_SKIPPING;
+ stream->fast_skip = true;
if (len >= 0) {
stream->seek = seek;
- stream->end_pos = len;
+ stream->seekable = true;
}
MP_VERBOSE(stream, "File size is %" PRId64 " bytes\n", len);