Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions libde265/motion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,16 @@ void generate_inter_prediction_samples(base_context* ctx,

logtrace(LogMotion, "refIdx: %d -> dpb[%d]\n", vi->refIdx[l], shdr->RefPicList[l][vi->refIdx[l]]);

if (refPic) {
auto nonconst_refPic = const_cast<de265_image*>(refPic); /* shared_ptr.get() chokes on const.*/
auto refsps = nonconst_refPic->get_shared_sps().get();
auto imgsps = img->get_shared_sps().get();
if(refsps != imgsps) {
// rejecting reference image created with different sps.
refPic = nullptr;
}
}

if (!refPic || refPic->PicState == UnusedForReference) {
img->integrity = INTEGRITY_DECODING_ERRORS;
ctx->add_warning(DE265_WARNING_NONEXISTING_REFERENCE_PICTURE_ACCESSED, false);
Expand Down