vo_gpu_next: check if existing cache file has correct size

This commit is contained in:
Kacper Michajłow 2024-05-10 21:15:34 +02:00
parent 1f69659a77
commit f17ad792c6
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}