Skip to content

Commit

Permalink
possible fix for #433
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Nov 23, 2023
1 parent 3e822a3 commit 6056390
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libde265/motion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,14 @@ void derive_spatial_luma_vector_prediction(base_context* ctx,
logmvcand(vi);

const de265_image* imgX = NULL;
if (vi.predFlag[X]) imgX = ctx->get_image(shdr->RefPicList[X][ vi.refIdx[X] ]);
if (vi.predFlag[X]) {
// check for input data validity
if (vi.refIdx[X]<0 || vi.refIdx[X] >= MAX_NUM_REF_PICS) {
return;
}

imgX = ctx->get_image(shdr->RefPicList[X][ vi.refIdx[X] ]);
}

const de265_image* imgY = NULL;
if (vi.predFlag[Y]) {
Expand Down

0 comments on commit 6056390

Please sign in to comment.