summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2016-05-04 00:19:07 +0200
committerwm4 <wm4@nowhere>2016-05-04 12:10:55 +0200
commit86b5f1463c9084d83fbfb60bcd15bdb67795bb25 (patch)
treea04f97e7dd74cc3ca7f70f6604166d143b839749
parent9054460bbaec267f7c08bf8115f50aba830bdc70 (diff)
downloadmpv-86b5f1463c9084d83fbfb60bcd15bdb67795bb25.tar.bz2
mpv-86b5f1463c9084d83fbfb60bcd15bdb67795bb25.tar.xz
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.
-rw-r--r--video/out/opengl/lcms.c2
1 files changed, 1 insertions, 1 deletions
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