mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 21:05:45 +00:00
Improve detection for hardware capabilities
This commit is contained in:
parent
9dfe3cece0
commit
5a7cc28dbc
1 changed files with 15 additions and 12 deletions
|
@ -113,6 +113,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) {
|
||||||
|
@ -126,6 +128,7 @@ bool Decoder::SupportsDecodingOnDevice(AVPixelFormat* out_pix_fmt, AVHWDeviceTyp
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue