Update cellVdecSetFrameRate error checking

This commit is contained in:
Eladash 2020-01-15 23:42:44 +02:00 committed by Megamouse
parent 74ad525566
commit 9084209cfc

View File

@ -931,13 +931,13 @@ error_code cellVdecSetFrameRate(u32 handle, CellVdecFrameRate frc)
const auto vdec = idm::get<vdec_context>(handle);
if (!vdec)
// 0x80 seems like a common prefix
if (!vdec || (frc & 0xf0) != 0x80)
{
return CELL_VDEC_ERROR_ARG;
}
// TODO: check frc value
vdec->in_cmd.push(frc);
vdec->in_cmd.push(CellVdecFrameRate{frc & 0x87});
return CELL_OK;
}