vo_gpu_next: check if existing cache file has correct size

This commit is contained in:
Kacper Michajłow committed 2024-05-10 22:54:25 +02:00
1 parent 1f69659a77
commit f17ad792c6
1 file changed
+2 -1
+2 -1
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;
}