fix for while loop hang (#447)

이 커밋은 다음에 포함됨:
Rajy Rawther 작성하고 GitHub가 2024-11-06 14:41:57 -05:00를 커밋함
1 부모 40dd67b19a
커밋 5820f38592
1 파일이 변경됨
+6 -8
+6 -8
파일 보기
@@ -2085,7 +2085,7 @@ void HevcVideoParser::ConstructRefPicLists(HevcSliceInfo *p_slice_info) {
rIdx = 0;
num_rps_curr_temp_list = std::max(p_slice_header->num_ref_idx_l0_active_minus1 + 1, num_pic_total_curr_);
while (rIdx < num_rps_curr_temp_list) {
while ((num_poc_st_curr_before_ | num_poc_st_curr_after_ | num_poc_lt_curr_) && (rIdx < num_rps_curr_temp_list)) {
for (i = 0; i < num_poc_st_curr_before_ && rIdx < num_rps_curr_temp_list; rIdx++, i++) {
ref_pic_list_temp[rIdx] = ref_pic_set_st_curr_before_[i];
}
@@ -2108,7 +2108,7 @@ void HevcVideoParser::ConstructRefPicLists(HevcSliceInfo *p_slice_info) {
rIdx = 0;
num_rps_curr_temp_list = std::max(p_slice_header->num_ref_idx_l1_active_minus1 + 1, num_pic_total_curr_);
while (rIdx < num_rps_curr_temp_list) {
while ((num_poc_st_curr_after_ | num_poc_st_curr_before_ | num_poc_lt_curr_) && (rIdx < num_rps_curr_temp_list)) {
for (i = 0; i < num_poc_st_curr_after_ && rIdx < num_rps_curr_temp_list; rIdx++, i++) {
ref_pic_list_temp[rIdx] = ref_pic_set_st_curr_after_[i];
}
@@ -2154,12 +2154,10 @@ void HevcVideoParser::EmptyDpb() {
}
int HevcVideoParser::FlushDpb() {
if (dpb_buffer_.num_pics_needed_for_output) {
// Bump the remaining pictures
while (dpb_buffer_.num_pics_needed_for_output) {
if (BumpPicFromDpb() != PARSER_OK) {
return PARSER_FAIL;
}
// Bump the remaining pictures
while (dpb_buffer_.num_pics_needed_for_output) {
if (BumpPicFromDpb() != PARSER_OK) {
return PARSER_FAIL;
}
}
if (pfn_display_picture_cb_ && num_output_pics_ > 0) {