Treat AV_CODEC_CAP_HARDWARE codecs as hardware accelerated too

This commit is contained in:
Cameron Gutman 2019-04-09 21:50:22 -07:00
parent 859a5a5e0c
commit 00a1948b73

View File

@ -32,7 +32,8 @@
bool FFmpegVideoDecoder::isHardwareAccelerated() bool FFmpegVideoDecoder::isHardwareAccelerated()
{ {
return m_HwDecodeCfg != nullptr; return m_HwDecodeCfg != nullptr ||
(m_VideoDecoderCtx->codec->capabilities & AV_CODEC_CAP_HARDWARE) != 0;
} }
int FFmpegVideoDecoder::getDecoderCapabilities() int FFmpegVideoDecoder::getDecoderCapabilities()