mirror of
https://github.com/mpv-player/mpv
synced 2024-10-30 04:46:41 +01:00
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.
This commit is contained in:
parent
f6fd2a05c4
commit
6265a2d779
@ -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)
|
||||
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;
|
||||
if (!check_va_status(res->log, status, "vaInitialize()"))
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user