From ab36eb705ab2decc7825d222065bce2ff9f4a4ed Mon Sep 17 00:00:00 2001 From: jeffqjiangNew <142832361+jeffqjiangNew@users.noreply.github.com> Date: Mon, 27 Nov 2023 19:54:49 -0500 Subject: [PATCH] * rocDecode/HEVC: Fixed the missing output picture issue on certain streams. (#89) - When we hit IRAP (Intra Random Access Point) picture and need to bump all remaining decoded pictures from DPB, call display callback immediately, instead of delaying the callback to the IRAP decode process. [ROCm/rocdecode commit: 09da68790ca9a4ad7af50e86551072aea1a72610] --- projects/rocdecode/src/parser/hevc_parser.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/rocdecode/src/parser/hevc_parser.cpp b/projects/rocdecode/src/parser/hevc_parser.cpp index 7b563bd611..e0823c6d56 100644 --- a/projects/rocdecode/src/parser/hevc_parser.cpp +++ b/projects/rocdecode/src/parser/hevc_parser.cpp @@ -2230,10 +2230,8 @@ int HEVCVideoParser::MarkOutputPictures() { if (!no_output_of_prior_pics_flag) { // Bump the remaining pictures - while (dpb_buffer_.num_needed_for_output) { - if (BumpPicFromDpb() != PARSER_OK) { - return PARSER_FAIL; - } + if (FlushDpb() != PARSER_OK) { + return PARSER_FAIL; } }