diff options
author | wm4 <wm4@nowhere> | 2017-01-12 09:21:58 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-01-12 13:58:28 +0100 |
commit | a51e991b564113254d9262565ddb69e40e2fd726 (patch) | |
tree | 039b47762bab42791e5d7b4c3cce83c22825e8d5 /video/vaapi.c | |
parent | fcb970492ccb5f351f4dce7ba52aefd38f544fe9 (diff) | |
download | mpv-a51e991b564113254d9262565ddb69e40e2fd726.tar.bz2 mpv-a51e991b564113254d9262565ddb69e40e2fd726.tar.xz |
vaapi: set our own context in AVHWFramesContext not AVHWDeviceContext
AVHWDeviceContext.user_opaque is reserved to libavutil under certain
circumstances, while AVHWFramesContext.user_opaque is truly free for use
by us. It's slightly simpler too.
Diffstat (limited to 'video/vaapi.c')
-rw-r--r-- | video/vaapi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/video/vaapi.c b/video/vaapi.c index 85350743d1..b239925c37 100644 --- a/video/vaapi.c +++ b/video/vaapi.c @@ -521,15 +521,15 @@ struct mp_image *va_surface_download(struct mp_image *src, if (!src->hwctx) return NULL; AVHWFramesContext *fctx = (void *)src->hwctx->data; - AVHWDeviceContext *dctx = fctx->device_ctx; - AVVAAPIDeviceContext *vactx = dctx->hwctx; + // as set by video/decode/vaapi.c + struct mp_vaapi_ctx *ctx = fctx->user_opaque; tmp_p = (struct va_surface){ - .ctx = dctx->user_opaque, // as set by video/decode/vaapi.c + .ctx = ctx, .id = va_surface_id(src), .rt_format = VA_RT_FORMAT_YUV420, .w = fctx->width, .h = fctx->height, - .display = vactx->display, + .display = ctx->display, .image = { .image_id = VA_INVALID_ID, .buf = VA_INVALID_ID }, }; p = &tmp_p; |