summaryrefslogtreecommitdiffstats
path: root/video/vdpau.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/vdpau.c')
-rw-r--r--video/vdpau.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/video/vdpau.c b/video/vdpau.c
index 339fb59d54..55ca8d95ce 100644
--- a/video/vdpau.c
+++ b/video/vdpau.c
@@ -113,7 +113,7 @@ static void preemption_callback(VdpDevice device, void *context)
pthread_mutex_unlock(&ctx->preempt_lock);
}
-static int win_x11_init_vdpau_procs(struct mp_vdpau_ctx *ctx)
+static int win_x11_init_vdpau_procs(struct mp_vdpau_ctx *ctx, bool probing)
{
Display *x11 = ctx->x11;
VdpStatus vdp_st;
@@ -142,11 +142,14 @@ static int win_x11_init_vdpau_procs(struct mp_vdpau_ctx *ctx)
vdp_st = vdp_device_create_x11(x11, DefaultScreen(x11), &ctx->vdp_device,
&get_proc_address);
if (vdp_st != VDP_STATUS_OK) {
- if (ctx->is_preempted)
+ if (ctx->is_preempted) {
MP_DBG(ctx, "Error calling vdp_device_create_x11 while preempted: %d\n",
vdp_st);
- else
- MP_ERR(ctx, "Error when calling vdp_device_create_x11: %d\n", vdp_st);
+ } else {
+ int lev = probing ? MSGL_V : MSGL_ERR;
+ mp_msg(ctx->log, lev, "Error when calling vdp_device_create_x11: %d\n",
+ vdp_st);
+ }
return -1;
}
@@ -182,7 +185,7 @@ static int handle_preemption(struct mp_vdpau_ctx *ctx)
if (ctx->last_preemption_retry_fail &&
mp_time_sec() - ctx->last_preemption_retry_fail < 1.0)
return -1;
- if (win_x11_init_vdpau_procs(ctx) < 0) {
+ if (win_x11_init_vdpau_procs(ctx, false) < 0) {
ctx->last_preemption_retry_fail = mp_time_sec();
return -1;
}
@@ -369,7 +372,8 @@ struct mp_image *mp_vdpau_get_video_surface(struct mp_vdpau_ctx *ctx,
return mp_vdpau_get_surface(ctx, chroma, 0, false, w, h);
}
-struct mp_vdpau_ctx *mp_vdpau_create_device_x11(struct mp_log *log, Display *x11)
+struct mp_vdpau_ctx *mp_vdpau_create_device_x11(struct mp_log *log, Display *x11,
+ bool probing)
{
struct mp_vdpau_ctx *ctx = talloc_ptrtype(NULL, ctx);
*ctx = (struct mp_vdpau_ctx) {
@@ -389,7 +393,7 @@ struct mp_vdpau_ctx *mp_vdpau_create_device_x11(struct mp_log *log, Display *x11
mark_vdpau_objects_uninitialized(ctx);
- if (win_x11_init_vdpau_procs(ctx) < 0) {
+ if (win_x11_init_vdpau_procs(ctx, probing) < 0) {
mp_vdpau_destroy(ctx);
return NULL;
}