gl_lcms: fix compilation when lcms2 is not available

This commit is contained in:
wm4 2013-03-30 03:29:54 +01:00
parent b617863c24
commit 624fe1736e
1 changed files with 10 additions and 3 deletions

View File

@ -21,7 +21,6 @@
*/
#include <string.h>
#include <lcms2.h>
#include "talloc.h"
@ -36,6 +35,10 @@
#include "gl_video.h"
#include "gl_lcms.h"
#ifdef CONFIG_LCMS2
#include <lcms2.h>
static bool parse_3dlut_size(const char *s, int *p1, int *p2, int *p3)
{
if (sscanf(s, "%dx%dx%d", p1, p2, p3) != 3)
@ -73,8 +76,6 @@ const struct m_sub_options mp_icc_conf = {
},
};
#ifdef CONFIG_LCMS2
static void lcms2_error_handler(cmsContext ctx, cmsUInt32Number code,
const char *msg)
{
@ -203,6 +204,12 @@ error_exit:
#else /* CONFIG_LCMS2 */
const struct m_sub_options mp_icc_conf = {
.opts = (m_option_t[]) { {0} },
.size = sizeof(struct mp_icc_opts),
.defaults = &(const struct mp_icc_opts) {0},
};
struct lut3d *mp_load_icc(struct mp_icc_opts *opts)
{
mp_msg(MSGT_VO, MSGL_FATAL, "[gl] LCMS2 support not compiled.\n");