From f62b0fa617e9739abcec00dcef5fbaf6d08404fe Mon Sep 17 00:00:00 2001 From: Aryan Salmanpour Date: Thu, 16 Nov 2023 12:39:23 -0500 Subject: [PATCH] Add additional debug info if we couldn't find the matching pic in reference list and return error (#69) * Add additional debug info if we couldn't find the matching pic in refrence list and return error * Correct the debug info message [ROCm/rocdecode commit: 5d5db9a017d02befcbec82c4413f64efbe2c047e] --- projects/rocdecode/src/parser/hevc_parser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/rocdecode/src/parser/hevc_parser.cpp b/projects/rocdecode/src/parser/hevc_parser.cpp index e447a13379..ad45fad074 100644 --- a/projects/rocdecode/src/parser/hevc_parser.cpp +++ b/projects/rocdecode/src/parser/hevc_parser.cpp @@ -446,7 +446,8 @@ int HEVCVideoParser::SendPicForDecode() { } } if (j == 15) { - ERR("Could not find matching pic in ref_frames list."); + ERR("Could not find matching pic in ref_frames list. The slice type is P/B, and the idx from the ref_pic_list_0_ is: " + TOSTR(idx)); + return PARSER_FAIL; } else { slice_params_ptr->RefPicList[0][i] = j; @@ -462,7 +463,8 @@ int HEVCVideoParser::SendPicForDecode() { } } if (j == 15) { - ERR("Could not find matching pic in ref_frames list."); + ERR("Could not find matching pic in ref_frames list. The slice type is B, and the idx from the ref_pic_list_1_ is: " + TOSTR(idx)); + return PARSER_FAIL; } else { slice_params_ptr->RefPicList[1][i] = j;