mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
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
This commit is contained in:
parent
e7ea893c2f
commit
0192eeb09c
@ -198,7 +198,8 @@ static bool recreate_dispmanx(struct ra_ctx *ctx)
|
|||||||
|
|
||||||
ctx->vo->dwidth = p->w;
|
ctx->vo->dwidth = p->w;
|
||||||
ctx->vo->dheight = p->h;
|
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;
|
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))
|
if (!ra_gl_ctx_init(ctx, &p->gl, params))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
ra_gl_ctx_resize(ctx->swapchain, ctx->vo->dwidth, ctx->vo->dheight, 0);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
Loading…
Reference in New Issue
Block a user