From 86b5f1463c9084d83fbfb60bcd15bdb67795bb25 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 4 May 2016 00:19:07 +0200 Subject: lcms: don't warn/error on 3dlut cache misses Cache misses are a normal and expected part of the operation of a cache. It doesn't really make sense to show a user-visible warning for them. To work-around this, just skip trying to open the cache if it doesn't exist yet. --- video/out/opengl/lcms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/opengl/lcms.c b/video/out/opengl/lcms.c index 20ebf6fd57..62ac06de8b 100644 --- a/video/out/opengl/lcms.c +++ b/video/out/opengl/lcms.c @@ -335,7 +335,7 @@ bool gl_lcms_get_lut3d(struct gl_lcms *p, struct lut3d **result_lut3d, } // check cache - if (cache_file) { + if (cache_file && stat(cache_file, &(struct stat){0}) == 0) { MP_VERBOSE(p, "Opening 3D LUT cache in file '%s'.\n", cache_file); struct bstr cachedata = stream_read_file(cache_file, tmp, p->global, 1000000000); // 1 GB -- cgit v1.2.3