summaryrefslogtreecommitdiffstats
path: root/video/out/gl_lcms.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-26 02:11:14 +0100
committerwm4 <wm4@nowhere>2015-01-26 02:11:14 +0100
commit73d5e396fee7de11c525495d066f40d28e3c242b (patch)
tree6f0ff331be1a437ccc82b0c208d89fd05f16611a /video/out/gl_lcms.c
parent9fc15e5e1c97984b428eaf4c60004fa7ddbcfde2 (diff)
downloadmpv-73d5e396fee7de11c525495d066f40d28e3c242b.tar.bz2
mpv-73d5e396fee7de11c525495d066f40d28e3c242b.tar.xz
vo_opengl: minor changes to ICC update code
Merge update_icc_profile() into get_and_update_icc_profile() - there's no reason anymore to keep them separate. The former is only called by the latter, and the separation of responsibilities between them is blurry a best. Query the ICC profile only if the corresponding feature is actually enabled. Additionally, change the error behavior of this code. Make loading failure non-fatal, and distinguish between runtime error and unimplemented functionality. Fix a memory leak in gl_lcms.c (although the changes in vo_opengl.c already take care of this, it's just logical and cleaner).
Diffstat (limited to 'video/out/gl_lcms.c')
-rw-r--r--video/out/gl_lcms.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/gl_lcms.c b/video/out/gl_lcms.c
index 8f65459ca8..ab273ffc0b 100644
--- a/video/out/gl_lcms.c
+++ b/video/out/gl_lcms.c
@@ -152,8 +152,10 @@ void gl_lcms_set_options(struct gl_lcms *p, struct mp_icc_opts *opts)
// takes over ownership.
void gl_lcms_set_memory_profile(struct gl_lcms *p, bstr *profile)
{
- if (!p->opts.profile_auto)
+ if (!p->opts.profile_auto) {
+ talloc_free(profile->start);
return;
+ }
if (!p->icc_path && p->icc_data && profile->start &&
profile->len == p->icc_size &&