* Roc decoder utility: Do not throw exceptions on picture decode or decoder reconfig errors. (#577)

- This allows the decoder to be able to handle more AV1 error streams.

[ROCm/rocdecode commit: d751b24ed5]
Este commit está contenido en:
jeffqjiangNew
2025-05-01 12:50:28 -04:00
cometido por GitHub
padre 8483251c80
commit a8f665e2be
Se han modificado 2 ficheros con 7 adiciones y 3 borrados
@@ -614,7 +614,9 @@ int RocVideoDecoder::ReconfigureDecoder(RocdecVideoFormat *p_video_format) {
return 0;
}
if (p_video_format->reconfig_options == ROCDEC_RECONFIG_NEW_SURFACES) {
ROCDEC_API_CALL(rocDecReconfigureDecoder(roc_decoder_, &reconfig_params));
if (rocDecReconfigureDecoder(roc_decoder_, &reconfig_params) != ROCDEC_SUCCESS) {
return 0;
}
}
input_video_info_str_.str("");
@@ -860,7 +862,9 @@ int RocVideoDecoder::DecodeFrame(const uint8_t *data, size_t size, int pkt_flags
if (!data || size == 0) {
packet.flags |= ROCDEC_PKT_ENDOFSTREAM;
}
ROCDEC_API_CALL(rocDecParseVideoData(rocdec_parser_, &packet));
if (rocDecParseVideoData(rocdec_parser_, &packet) != ROCDEC_SUCCESS) {
ROCDEC_ERR("Error occurred in rocDecParseVideoData().");
}
if (num_decoded_pics) {
*num_decoded_pics = decoded_pic_cnt_;
}