* AVC: Fixed an issue in video size change cases, where the remaining decoded buffers of the previous video size in DPB are not output. (#550)

- We need to flush DPB before decoder reconfiguration.

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

[ROCm/rocdecode commit: 9127f2ccba]
This commit is contained in:
jeffqjiangNew
2025-04-07 20:34:01 -04:00
کامیت شده توسط GitHub
والد 97d503139d
کامیت 8b5cf557df
@@ -71,6 +71,9 @@ rocDecStatus AvcVideoParser::ParseVideoData(RocdecSourceDataPacket *p_data) {
// Init Roc decoder for the first time or reconfigure the existing decoder
if (new_seq_activated_) {
if (FlushDpb() != PARSER_OK) {
return ROCDEC_RUNTIME_ERROR;
}
if (NotifyNewSps(&sps_list_[active_sps_id_]) != PARSER_OK) {
return ROCDEC_RUNTIME_ERROR;
}
@@ -2762,7 +2765,7 @@ ParserResult AvcVideoParser::MarkDecodedRefPics() {
}
// Output the remaining picutres in DPB
if (FlushDpb() != PARSER_OK) {
return PARSER_FAIL;
return PARSER_FAIL;
}
dpb_buffer_.num_long_term = 0;
dpb_buffer_.num_short_term = 0;