From 9084209cfcc42e115fedb27b5f5da0089bfc8c94 Mon Sep 17 00:00:00 2001 From: Eladash Date: Wed, 15 Jan 2020 23:42:44 +0200 Subject: [PATCH] Update cellVdecSetFrameRate error checking --- rpcs3/Emu/Cell/Modules/cellVdec.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellVdec.cpp b/rpcs3/Emu/Cell/Modules/cellVdec.cpp index 95cb537168..7396ea965a 100644 --- a/rpcs3/Emu/Cell/Modules/cellVdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVdec.cpp @@ -931,13 +931,13 @@ error_code cellVdecSetFrameRate(u32 handle, CellVdecFrameRate frc) const auto vdec = idm::get(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; }