From 48a770edecee5a0ed9ff6b02637b6534ac533ff8 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 3 Aug 2018 02:49:43 -0700 Subject: [PATCH] Enable HEVC support on NVIDIA GPUs with VDPAU --- app/streaming/video/ffmpeg-renderers/vdpau.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/streaming/video/ffmpeg-renderers/vdpau.cpp b/app/streaming/video/ffmpeg-renderers/vdpau.cpp index e59ff119..8b117537 100644 --- a/app/streaming/video/ffmpeg-renderers/vdpau.cpp +++ b/app/streaming/video/ffmpeg-renderers/vdpau.cpp @@ -216,6 +216,11 @@ bool VDPAURenderer::prepareDecoderContext(AVCodecContext* context) { context->hw_device_ctx = av_buffer_ref(m_HwContext); + // Allow HEVC usage on VDPAU. This was disabled by FFmpeg due to + // GL interop issues, but we use VDPAU for rendering so it's no issue. + // https://github.com/FFmpeg/FFmpeg/commit/64ecb78b7179cab2dbdf835463104679dbb7c895 + context->hwaccel_flags |= AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH; + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Using VDPAU accelerated renderer");