diff options
Diffstat (limited to 'video/out/vo_gpu_next.c')
-rw-r--r-- | video/out/vo_gpu_next.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index d68c836b52..67f7d5833a 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -17,10 +17,8 @@ * License along with mpv. If not, see <http://www.gnu.org/licenses/>. */ -#include <dirent.h> #include <sys/stat.h> #include <time.h> -#include <unistd.h> #include <libplacebo/colorspace.h> #include <libplacebo/options.h> @@ -1652,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; } |