* rocDecode/HEVC: In flush DPB function, added a check for any buffers that need for output before any actions. This prevents any potential issues. (#121)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9257cd6fcf
Коммит
fcd63b9358
@@ -2235,16 +2235,17 @@ void HEVCVideoParser::EmptyDpb() {
|
||||
}
|
||||
|
||||
int HEVCVideoParser::FlushDpb() {
|
||||
dpb_buffer_.num_output_pics = 0;
|
||||
// Bump the remaining pictures
|
||||
while (dpb_buffer_.num_needed_for_output) {
|
||||
if (BumpPicFromDpb() != PARSER_OK) {
|
||||
return PARSER_FAIL;
|
||||
if (dpb_buffer_.num_needed_for_output) {
|
||||
// Bump the remaining pictures
|
||||
while (dpb_buffer_.num_needed_for_output) {
|
||||
if (BumpPicFromDpb() != PARSER_OK) {
|
||||
return PARSER_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pfn_display_picture_cb_ && dpb_buffer_.num_output_pics > 0) {
|
||||
if (OutputDecodedPictures() != PARSER_OK) {
|
||||
return PARSER_FAIL;
|
||||
if (pfn_display_picture_cb_ && dpb_buffer_.num_output_pics > 0) {
|
||||
if (OutputDecodedPictures() != PARSER_OK) {
|
||||
return PARSER_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER_OK;
|
||||
|
||||
Ссылка в новой задаче
Block a user