diff options
author | Niklas Haas <git@haasn.xyz> | 2018-01-15 00:35:51 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-01-15 23:16:17 -0800 |
commit | 0192eeb09cddcfe543ca87dd769efc61a1d73430 (patch) | |
tree | 50f94acf65d7f6e252ed0aab6566ab28a7d8f48a /video | |
parent | e7ea893c2f02ada7a77d28a53994e029f074cd5c (diff) | |
download | mpv-0192eeb09cddcfe543ca87dd769efc61a1d73430.tar.bz2 mpv-0192eeb09cddcfe543ca87dd769efc61a1d73430.tar.xz |
vo_gpu: rpi: defer gl_ctx_resize until after gl_ctx_init
This segfaults otherwise. The conditional is needed to break a circular
dependency (gl_init depends on mpgl_load_functions which depends on
recreate_dispmanx which calls gl_ctx_resize).
Fixes #5398
Diffstat (limited to 'video')
-rw-r--r-- | video/out/opengl/context_rpi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/opengl/context_rpi.c b/video/out/opengl/context_rpi.c index 8b447d0bfc..1b81e6a460 100644 --- a/video/out/opengl/context_rpi.c +++ b/video/out/opengl/context_rpi.c @@ -198,7 +198,8 @@ static bool recreate_dispmanx(struct ra_ctx *ctx) ctx->vo->dwidth = p->w; ctx->vo->dheight = p->h; - ra_gl_ctx_resize(ctx->swapchain, p->w, p->h, 0); + if (ctx->swapchain) + ra_gl_ctx_resize(ctx->swapchain, p->w, p->h, 0); ctx->vo->want_redraw = true; @@ -247,6 +248,7 @@ static bool rpi_init(struct ra_ctx *ctx) if (!ra_gl_ctx_init(ctx, &p->gl, params)) goto fail; + ra_gl_ctx_resize(ctx->swapchain, ctx->vo->dwidth, ctx->vo->dheight, 0); return true; fail: |