mirror of https://github.com/mpv-player/mpv
vo_gpu_next: check if existing cache file has correct size
This commit is contained in:
parent
1f69659a77
commit
f17ad792c6
|
@ -1650,7 +1650,8 @@ static void cache_save_obj(void *p, pl_cache_obj obj)
|
|||
}
|
||||
|
||||
// Don't save if already exists
|
||||
if (!stat(filepath, &(struct stat){0})) {
|
||||
struct stat st;
|
||||
if (!stat(filepath, &st) && st.st_size == obj.size) {
|
||||
MP_DBG(c, "%s: key(%"PRIx64"), size(%zu)\n", __func__, obj.key, obj.size);
|
||||
goto done;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue