summaryrefslogtreecommitdiffstats
path: root/video/vaapi.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-09-30 16:07:00 +0200
committerwm4 <wm4@nowhere>2017-09-30 16:07:00 +0200
commitf3512686eee6c1a7650e1e769169b4018ee4466d (patch)
treeec52b4651375f5c27e611c427b463e1591875f19 /video/vaapi.h
parent4516707848159808c34e3dbb54c29fa7a5d41a13 (diff)
downloadmpv-f3512686eee6c1a7650e1e769169b4018ee4466d.tar.bz2
mpv-f3512686eee6c1a7650e1e769169b4018ee4466d.tar.xz
vaapi: replace error macro implementation
The current check_va_status() function could probably be argued to be derived from the original VAAPI's patch check_status() function, thus GPL-only. While I have my doubts that it applies to an idiom on this level, it's better to replace it. Similar idea, different expression equals no copyright association. An earlier commit message promised this, but it was forgotten.
Diffstat (limited to 'video/vaapi.h')
-rw-r--r--video/vaapi.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/vaapi.h b/video/vaapi.h
index 2e438bebfb..41c9f7c1cb 100644
--- a/video/vaapi.h
+++ b/video/vaapi.h
@@ -36,9 +36,9 @@ struct mp_vaapi_ctx {
void (*destroy_native_ctx)(void *native_ctx);
};
-bool check_va_status(struct mp_log *log, VAStatus status, const char *msg);
-
-#define CHECK_VA_STATUS(ctx, msg) check_va_status((ctx)->log, status, msg)
+#define CHECK_VA_STATUS(ctx, msg) \
+ (status == VA_STATUS_SUCCESS ? true \
+ : (MP_ERR(ctx, "%s failed (%s)\n", msg, vaErrorStr(status)), false))
int va_get_colorspace_flag(enum mp_csp csp);