mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
cellVdecQueryAttrEx: Add workaround for codec specific info
This commit is contained in:
parent
acc7320cae
commit
6a32ceaab5
1 changed files with 9 additions and 2 deletions
|
@ -505,7 +505,7 @@ static error_code vdecQueryAttr(s32 type, u32 profile, u32 spec_addr /* may be 0
|
||||||
|
|
||||||
attr->decoderVerLower = decoderVerLower;
|
attr->decoderVerLower = decoderVerLower;
|
||||||
attr->decoderVerUpper = 0x4840010;
|
attr->decoderVerUpper = 0x4840010;
|
||||||
attr->memSize = verify(HERE, memSize);
|
attr->memSize = !spec_addr ? verify(HERE, memSize) : 4 * 1024 * 1024;
|
||||||
attr->cmdDepth = 4;
|
attr->cmdDepth = 4;
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -548,8 +548,15 @@ static error_code vdecOpen(ppu_thread& ppu, T type, U res, vm::cptr<CellVdecCb>
|
||||||
return CELL_VDEC_ERROR_ARG;
|
return CELL_VDEC_ERROR_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 spec_addr = 0;
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<std::decay_t<typename T::type>, CellVdecTypeEx>)
|
||||||
|
{
|
||||||
|
spec_addr = type->codecSpecificInfo_addr;
|
||||||
|
}
|
||||||
|
|
||||||
if (CellVdecAttr attr{};
|
if (CellVdecAttr attr{};
|
||||||
vdecQueryAttr(type->codecType, type->profileLevel, 0, &attr) != CELL_OK ||
|
vdecQueryAttr(type->codecType, type->profileLevel, spec_addr, &attr) != CELL_OK ||
|
||||||
attr.memSize > res->memSize)
|
attr.memSize > res->memSize)
|
||||||
{
|
{
|
||||||
return CELL_VDEC_ERROR_ARG;
|
return CELL_VDEC_ERROR_ARG;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue