From a0e89daf49d429d05b1a87886f0f834648a2ff36 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 22 Dec 2013 12:25:51 +0100 Subject: gl_lcms: actually acquire mutex Prevents race conditions (which can happen only in theory anyway). --- video/out/gl_lcms.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/video/out/gl_lcms.c b/video/out/gl_lcms.c index 958e207951..01e40f9e92 100644 --- a/video/out/gl_lcms.c +++ b/video/out/gl_lcms.c @@ -86,8 +86,10 @@ const struct m_sub_options mp_icc_conf = { static void lcms2_error_handler(cmsContext ctx, cmsUInt32Number code, const char *msg) { + pthread_mutex_lock(&lcms2_dumb_crap_lock); if (lcms2_dumb_crap) mp_msg(lcms2_dumb_crap, MSGL_ERR, "lcms2: %s\n", msg); + pthread_mutex_unlock(&lcms2_dumb_crap_lock); } static struct bstr load_file(void *talloc_ctx, const char *filename, -- cgit v1.2.3