summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2020-10-15 12:18:59 -0500
committerDudemanguy <random342@airmail.cc>2020-10-15 12:18:59 -0500
commitf781c00ece48ac8b5d0ce1429e08d10365dfa932 (patch)
treecba09bafa0b9215947f7f2a0d7a424ee68bb903d
parentf5a094db047ee0162774301a2ce4ed685ca9d539 (diff)
downloadmpv-f781c00ece48ac8b5d0ce1429e08d10365dfa932.tar.bz2
mpv-f781c00ece48ac8b5d0ce1429e08d10365dfa932.tar.xz
vo_gpu: fix segfault when updating render opts
VOCTRL_UPDATE_RENDER_OPTS is supposed to be optional so check if it actually exists before executing the function. Fixes a segfault when changing the alpha value at runtime on non-wayland platforms.
-rw-r--r--video/out/vo_gpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/vo_gpu.c b/video/out/vo_gpu.c
index f7c29ceacb..5d28a30054 100644
--- a/video/out/vo_gpu.c
+++ b/video/out/vo_gpu.c
@@ -207,7 +207,8 @@ static int control(struct vo *vo, uint32_t request, void *data)
update_ra_ctx_options(vo);
gl_video_configure_queue(p->renderer, vo);
get_and_update_icc_profile(p);
- p->ctx->fns->update_render_opts(p->ctx);
+ if (p->ctx->fns->update_render_opts)
+ p->ctx->fns->update_render_opts(p->ctx);
vo->want_redraw = true;
return true;
}