summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-16 23:36:05 +0100
committerwm4 <wm4@nowhere>2020-02-16 23:36:05 +0100
commit20eead18130fd460d8e9eff50ce14afd3646faab (patch)
tree54a34a31b7c758bf5abdb943ca14c4f48fcb250e /demux/demux.c
parent249bb091d4880a564c00f8354111e12cfd0183a3 (diff)
downloadmpv-20eead18130fd460d8e9eff50ce14afd3646faab.tar.bz2
mpv-20eead18130fd460d8e9eff50ce14afd3646faab.tar.xz
stream_file: use fstat() instead of lseek() to determine file size
It appears using lseek() to seek to the end and back to determine file size is inefficient in some cases. With CIFS, this restores the performance regression that happened when the stream cache was removed (which called read() from a thread). This is probably faster than the old code too, because it's the seeking that was slowing down CIFS. According to the user who tested this, the size caching does not help with fstat() (although it did with the old method). Fixes: #7408, #7152
Diffstat (limited to 'demux/demux.c')
0 files changed, 0 insertions, 0 deletions