From 4e384c8e69422acf593fc7b2a0c1d512c3e5966e Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 14 Mar 2017 23:29:47 +0100 Subject: vdpau: warn on HEVC due to completely broken nVidia drivers I guess that's the full extent I still care about nVidia's broken garbage. In theory, we could always force the video mixer (which is the only method getting the video data that works), but why bother. --- video/decode/hw_vdpau.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/video/decode/hw_vdpau.c b/video/decode/hw_vdpau.c index 6047ef1360..e47893f19a 100644 --- a/video/decode/hw_vdpau.c +++ b/video/decode/hw_vdpau.c @@ -51,10 +51,13 @@ static int init_decoder(struct lavc_ctx *ctx, int w, int h) if (mp_vdpau_handle_preemption(p->mpvdp, &p->preemption_counter) < 0) return 0; - return av_vdpau_bind_context(ctx->avctx, p->mpvdp->vdp_device, - p->mpvdp->get_proc_address, - AV_HWACCEL_FLAG_IGNORE_LEVEL | - AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH); + int r = av_vdpau_bind_context(ctx->avctx, p->mpvdp->vdp_device, + p->mpvdp->get_proc_address, + AV_HWACCEL_FLAG_IGNORE_LEVEL | + AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH); + if (r >= 0 && ctx->avctx->codec_id == AV_CODEC_ID_HEVC) + MP_WARN(ctx, "HEVC video output may be broken due to nVidia bugs.\n"); + return r; } static void uninit(struct lavc_ctx *ctx) -- cgit v1.2.3