mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 04:58:06 +00:00
disable file size caching
This commit is contained in:
parent
a19d918816
commit
95ec4e4580
@ -76,11 +76,11 @@ struct priv {
|
|||||||
static int64_t get_size(stream_t *s)
|
static int64_t get_size(stream_t *s)
|
||||||
{
|
{
|
||||||
struct priv *p = s->priv;
|
struct priv *p = s->priv;
|
||||||
if (p->cached_size == -2) {
|
//if (p->cached_size == -2) {
|
||||||
off_t size = lseek(p->fd, 0, SEEK_END);
|
off_t size = lseek(p->fd, 0, SEEK_END);
|
||||||
lseek(p->fd, s->pos, SEEK_SET);
|
lseek(p->fd, s->pos, SEEK_SET);
|
||||||
p->cached_size = size < 0 ? -1 : size;
|
p->cached_size = size < 0 ? -1 : size;
|
||||||
}
|
//}
|
||||||
return p->cached_size;
|
return p->cached_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user