The commit added check to make sure no invalid memory access even when
the decoder instance is never initialized.
Change-Id: I4da343d0b3c78c27777ac7f5ce7688562c69f0c5
if (corrupted) {
VP9D_COMP *pbi = (VP9D_COMP *)ctx->pbi;
- *corrupted = pbi->common.frame_to_show->corrupted;
-
+ if (pbi)
+ *corrupted = pbi->common.frame_to_show->corrupted;
+ else
+ return VPX_CODEC_ERROR;
return VPX_CODEC_OK;
} else {
return VPX_CODEC_INVALID_PARAM;