path: root/video
diff options
authorwm4 <wm4@nowhere>2017-09-29 16:51:30 +0200
committerwm4 <wm4@nowhere>2017-09-29 16:51:30 +0200
commit6265a2d7793c52b16f48f6f8db5d8833d350abc5 (patch)
tree6600a3e48c8652ba34fcd7c2bea602eb71c7c6e7 /video
parentf6fd2a05c4249ff4eeb8b0d1be4e40a5a1c6177a (diff)
vaapi: minor changes
This is for relicensing. Some of this code is loosely based on vo_vaapi.c from the original MPlayer-vaapi patches. Most of the code has changed, and only the initialization code and check_status() look remotely similar. The initialization code is changed to be like Libav's (hwcontext_vaapi.c). check_va_status() is just a C idiom, but to play it safe, we'll either drop it from LGPL code (or recreate it). vaapi.c still contains plenty of code from the original patches, but the next commits will move them out of the LGPL code paths.
Diffstat (limited to 'video')
1 files changed, 7 insertions, 7 deletions
diff --git a/video/vaapi.c b/video/vaapi.c
index 5f22dbb28a..f977b054e4 100644
--- a/video/vaapi.c
+++ b/video/vaapi.c
@@ -192,14 +192,14 @@ struct mp_vaapi_ctx *va_initialize(VADisplay *display, struct mp_log *plog,
- int major_version, minor_version;
- int status = vaInitialize(display, &major_version, &minor_version);
- if (status != VA_STATUS_SUCCESS && probing)
- goto error;
- if (!check_va_status(res->log, status, "vaInitialize()"))
+ int major, minor;
+ int status = vaInitialize(display, &major, &minor);
+ if (status != VA_STATUS_SUCCESS) {
+ if (!probing)
+ MP_ERR(res, "Failed to initialize VAAPI: %s\n", vaErrorStr(status));
goto error;
- MP_VERBOSE(res, "VA API version %d.%d\n", major_version, minor_version);
+ }
+ MP_VERBOSE(res, "Initialized VAAPI: version %d.%d\n", major, minor);
if (!res->image_formats)