summaryrefslogtreecommitdiff
path: root/media-video/mpv/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-23 20:48:53 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-23 20:48:53 +0000
commit51536d2fe4697ba9114d611178bb9e20d3d5b729 (patch)
tree30b91d98e65985a575940ed49e756697c1f049c2 /media-video/mpv/files
parent4ab6db5717ef23f29320d4c6fb9ebdb8dec1f193 (diff)
gentoo resync : 23.12.2017
Diffstat (limited to 'media-video/mpv/files')
-rw-r--r--media-video/mpv/files/0.27.0/mpv-0.27.0-support-libva2.patch (renamed from media-video/mpv/files/mpv-libva2.patch)24
1 files changed, 11 insertions, 13 deletions
diff --git a/media-video/mpv/files/mpv-libva2.patch b/media-video/mpv/files/0.27.0/mpv-0.27.0-support-libva2.patch
index 843e84494541..8ae7f537682f 100644
--- a/media-video/mpv/files/mpv-libva2.patch
+++ b/media-video/mpv/files/0.27.0/mpv-0.27.0-support-libva2.patch
@@ -1,12 +1,10 @@
-From 2ecf240b1cd20875991a5b18efafbe799864ff7f Mon Sep 17 00:00:00 2001
-From: Mark Thompson <sw@jkqxz.net>
-Date: Mon, 9 Oct 2017 20:10:26 +0100
-Subject: [PATCH] vaapi: Use libva2 message callbacks
+commit 2ecf240b1cd20875991a5b18efafbe799864ff7f
+Author: Mark Thompson <sw@jkqxz.net>
+Date: Mon Oct 9 20:10:26 2017 +0100
+
+vaapi: Use libva2 message callbacks
They are no longer global, so they work vaguely sensibly.
----
- video/vaapi.c | 32 +++++++++++++++++++++++++++++---
- 1 file changed, 29 insertions(+), 3 deletions(-)
diff --git a/video/vaapi.c b/video/vaapi.c
index 6bedbbaa18..3b1cb9cc41 100644
@@ -15,7 +13,7 @@ index 6bedbbaa18..3b1cb9cc41 100644
@@ -40,9 +40,27 @@ int va_get_colorspace_flag(enum mp_csp csp)
return 0;
}
-
+
-// VA message callbacks are global and do not have a context parameter, so it's
-// impossible to know from which VADisplay they originate. Try to route them
-// to existing mpv/libmpv instances within this process.
@@ -48,13 +46,13 @@ index 6bedbbaa18..3b1cb9cc41 100644
va_message_callback(msg, MSGL_V);
}
+#endif
-
+
static void open_lavu_vaapi_device(struct mp_vaapi_ctx *ctx)
{
@@ -108,6 +127,10 @@ struct mp_vaapi_ctx *va_initialize(VADisplay *display, struct mp_log *plog,
},
};
-
+
+#if VA_CHECK_VERSION(1, 0, 0)
+ vaSetErrorCallback(display, va_error_callback, res);
+ vaSetInfoCallback(display, va_info_callback, res);
@@ -68,12 +66,12 @@ index 6bedbbaa18..3b1cb9cc41 100644
vaSetInfoCallback(va_info_callback);
+#endif
#endif
-
+
int major, minor;
@@ -154,6 +178,7 @@ void va_destroy(struct mp_vaapi_ctx *ctx)
if (ctx->destroy_native_ctx)
ctx->destroy_native_ctx(ctx->native_ctx);
-
+
+#if !VA_CHECK_VERSION(1, 0, 0)
pthread_mutex_lock(&va_log_mutex);
for (int n = 0; n < num_va_mpv_clients; n++) {
@@ -83,6 +81,6 @@ index 6bedbbaa18..3b1cb9cc41 100644
TA_FREEP(&va_mpv_clients); // avoid triggering leak detectors
pthread_mutex_unlock(&va_log_mutex);
+#endif
-
+
talloc_free(ctx);
}