diff options
author | wm4 <wm4@nowhere> | 2017-09-29 16:51:30 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-09-29 16:51:30 +0200 |
commit | 6265a2d7793c52b16f48f6f8db5d8833d350abc5 (patch) | |
tree | 6600a3e48c8652ba34fcd7c2bea602eb71c7c6e7 /video | |
parent | f6fd2a05c4249ff4eeb8b0d1be4e40a5a1c6177a (diff) | |
download | mpv-6265a2d7793c52b16f48f6f8db5d8833d350abc5.tar.bz2 mpv-6265a2d7793c52b16f48f6f8db5d8833d350abc5.tar.xz |
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')
-rw-r--r-- | video/vaapi.c | 14 |
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, vaSetInfoCallback(va_info_callback); #endif - 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); va_get_formats(res); if (!res->image_formats) |