summaryrefslogtreecommitdiffstats
path: root/video/out/wldmabuf
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-01-08 13:31:03 -0600
committerDudemanguy <random342@airmail.cc>2023-01-08 20:42:42 +0000
commitd73fc7912a46d4cb9c3e07f01f5ae2d64e7d9ff5 (patch)
treed6e6ee882cb403d90e220f2ab16d0d732d506fb5 /video/out/wldmabuf
parente4e0e7dfcf3a79f7bb510e11d059bcf8d1e93bd6 (diff)
downloadmpv-d73fc7912a46d4cb9c3e07f01f5ae2d64e7d9ff5.tar.bz2
mpv-d73fc7912a46d4cb9c3e07f01f5ae2d64e7d9ff5.tar.xz
wayland: cleanup on vo_wayland_init error
Instead of just returning true/false, it's better to have this function cleanup itself. We can eliminate some redundant uninit calls elsewhere in the code as well.
Diffstat (limited to 'video/out/wldmabuf')
-rw-r--r--video/out/wldmabuf/context_wldmabuf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/video/out/wldmabuf/context_wldmabuf.c b/video/out/wldmabuf/context_wldmabuf.c
index 0a5999ad73..472374c427 100644
--- a/video/out/wldmabuf/context_wldmabuf.c
+++ b/video/out/wldmabuf/context_wldmabuf.c
@@ -27,10 +27,8 @@ static void uninit(struct ra_ctx *ctx)
static bool init(struct ra_ctx *ctx)
{
- if (!vo_wayland_init(ctx->vo)) {
- vo_wayland_uninit(ctx->vo);
+ if (!vo_wayland_init(ctx->vo))
return false;
- }
ctx->ra = ra_create_wayland(ctx->log, ctx->vo->wl->display);
return true;