From 00a1948b73b429232c057c000c5b7f22c2e22f55 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 9 Apr 2019 21:50:22 -0700 Subject: [PATCH] Treat AV_CODEC_CAP_HARDWARE codecs as hardware accelerated too --- app/streaming/video/ffmpeg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/streaming/video/ffmpeg.cpp b/app/streaming/video/ffmpeg.cpp index fc9606b8..9f990253 100644 --- a/app/streaming/video/ffmpeg.cpp +++ b/app/streaming/video/ffmpeg.cpp @@ -32,7 +32,8 @@ bool FFmpegVideoDecoder::isHardwareAccelerated() { - return m_HwDecodeCfg != nullptr; + return m_HwDecodeCfg != nullptr || + (m_VideoDecoderCtx->codec->capabilities & AV_CODEC_CAP_HARDWARE) != 0; } int FFmpegVideoDecoder::getDecoderCapabilities()