Skip to content

Commit cfa12a4

Browse files
committed
fix passing through the error (a6646d0)
1 parent a37dbf1 commit cfa12a4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

libde265/decctx.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2088,7 +2088,9 @@ bool decoder_context::process_slice_segment_header(slice_segment_header* hdr,
20882088
img->PicState = UsedForShortTermReference;
20892089

20902090
*err = process_reference_picture_set(hdr);
2091-
return false;
2091+
if (*err != DE265_OK) {
2092+
return false;
2093+
}
20922094
}
20932095

20942096
img->PicState = UsedForShortTermReference;

libde265/dpb.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ int decoded_picture_buffer::new_image(std::shared_ptr<const seq_parameter_set> s
237237

238238
// create a new image slot if no empty slot remaining
239239

240-
if (free_image_buffer_idx == -1) {
240+
if (free_image_buffer_idx == -DE265_ERROR_IMAGE_BUFFER_FULL) {
241241
free_image_buffer_idx = dpb.size();
242242
dpb.push_back(new de265_image);
243243
}

0 commit comments

Comments
 (0)