2
0
Эх сурвалжийг харах

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
Yandong Lin 1 жил өмнө
parent
commit
e7440ce6f4

+ 4 - 0
mpp/codec/dec/jpeg/jpegd_parser.c

@@ -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");