fix[jpegd]: add sof marker check when parser done

related issue: https://redmine.rock-chips.com/issues/438772

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I262b1f1adb8d5cb8d7fa228e2617860510a82f12
This commit is contained in:
Yandong Lin
2023-12-08 09:47:08 +08:00
parent cc7647240e
commit e7440ce6f4

View File

@@ -892,6 +892,10 @@ done:
jpegd_setup_default_dht(ctx);
syntax->htbl_entry = 0x0f;
}
if (!syntax->sof0_found) {
mpp_err_f("sof marker not found!\n");
ret = MPP_ERR_STREAM;
}
if (!syntax->eoi_found) {
if (MPP_OK != jpegd_find_eoi(&buf_ptr, buf_end)) {
mpp_err_f("EOI marker not found!\n");