[vlc-commits] vaapi: code cleaning
Steve Lhomme
git at videolan.org
Tue Nov 19 15:11:53 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Nov 19 14:34:42 2019 +0100| [e0c16e9c2bfbc76354b164196d31409ca3f7b3d9] | committer: Steve Lhomme
vaapi: code cleaning
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e0c16e9c2bfbc76354b164196d31409ca3f7b3d9
---
modules/hw/vaapi/vlc_vaapi.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/modules/hw/vaapi/vlc_vaapi.c b/modules/hw/vaapi/vlc_vaapi.c
index 2a75ccaa53..f0fc5f9594 100644
--- a/modules/hw/vaapi/vlc_vaapi.c
+++ b/modules/hw/vaapi/vlc_vaapi.c
@@ -454,11 +454,9 @@ pic_ctx_copy_cb(struct picture_context_t *opaque)
if (dst_ctx == NULL)
return NULL;
+ *dst_ctx = *src_ctx;
dst_ctx->ctx.s.destroy = pic_ctx_destroy_cb;
- dst_ctx->ctx.s.copy = pic_ctx_copy_cb;
- dst_ctx->ctx.surface = src_ctx->ctx.surface;
- dst_ctx->ctx.va_dpy = src_ctx->ctx.va_dpy;
- dst_ctx->picref = picture_Hold(src_ctx->picref);
+ picture_Hold(dst_ctx->picref);
return &dst_ctx->ctx.s;
}
@@ -516,8 +514,9 @@ vlc_vaapi_PoolNew(vlc_object_t *o, vlc_decoder_device *dec_device,
goto error_pic;
}
p_sys->instance = instance;
- p_sys->ctx.ctx.s.destroy = pic_sys_ctx_destroy_cb;
- p_sys->ctx.ctx.s.copy = pic_ctx_copy_cb;
+ p_sys->ctx.ctx.s = (picture_context_t) {
+ pic_sys_ctx_destroy_cb, pic_ctx_copy_cb,
+ };
p_sys->ctx.ctx.surface = instance->render_targets[i];
p_sys->ctx.ctx.va_dpy = dpy;
p_sys->ctx.picref = NULL;
More information about the vlc-commits
mailing list