Browse Source

Improve detection for hardware capabilities

pull/85/head
MaranBr 8 months ago
committed by crueter
parent
commit
9d6ce0ff16
  1. 3
      src/video_core/host1x/ffmpeg/ffmpeg.cpp

3
src/video_core/host1x/ffmpeg/ffmpeg.cpp

@ -103,6 +103,8 @@ Decoder::Decoder(Tegra::Host1x::NvdecCommon::VideoCodec codec) {
} }
bool Decoder::SupportsDecodingOnDevice(AVPixelFormat* out_pix_fmt, AVHWDeviceType type) const { bool Decoder::SupportsDecodingOnDevice(AVPixelFormat* out_pix_fmt, AVHWDeviceType type) const {
AVCodec *decoder = avcodec_find_decoder(m_codec);
if (decoder) {
for (int i = 0;; i++) { for (int i = 0;; i++) {
const AVCodecHWConfig* config = avcodec_get_hw_config(m_codec, i); const AVCodecHWConfig* config = avcodec_get_hw_config(m_codec, i);
if (!config) { if (!config) {
@ -116,6 +118,7 @@ bool Decoder::SupportsDecodingOnDevice(AVPixelFormat* out_pix_fmt, AVHWDeviceTyp
return true; return true;
} }
} }
}
return false; return false;
} }

Loading…
Cancel
Save