Skip to content

Commit

Permalink
check whether referenced PPS exists (fixes #393)
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Mar 4, 2023
1 parent d6bf73e commit 0b1752a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libde265/decctx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2004,9 +2004,10 @@ bool decoder_context::process_slice_segment_header(slice_segment_header* hdr,
// get PPS and SPS for this slice

int pps_id = hdr->slice_pic_parameter_set_id;
if (pps[pps_id]->pps_read==false) {
if (pps[pps_id]==nullptr || pps[pps_id]->pps_read==false) {
logerror(LogHeaders, "PPS %d has not been read\n", pps_id);
assert(false); // TODO
img->decctx->add_warning(DE265_WARNING_NONEXISTING_PPS_REFERENCED, false);
return false;
}

current_pps = pps[pps_id];
Expand Down

0 comments on commit 0b1752a

Please sign in to comment.