Don't call DestroyDataBuffers during the reconfiguration - this function will be called during SubmitDecode (#131)

This commit is contained in:
Aryan Salmanpour
2023-12-11 17:10:10 -05:00
committed by GitHub
orang tua b77d00e38e
melakukan b8a8b66b91
@@ -299,11 +299,6 @@ rocDecStatus VaapiVideoDecoder::ReconfigureDecoder(RocdecReconfigureDecoderInfo
ERR("ERROR: VAAPI decoder has not been initialized but reconfiguration of the decoder has been requested!");
return ROCDEC_NOT_SUPPORTED;
}
rocDecStatus rocdec_status = DestroyDataBuffers();
if (rocdec_status != ROCDEC_SUCCESS) {
ERR("ERROR: Failed to destroy VAAPI buffers during the reconfiguration, with rocDecStatus# " + TOSTR(rocdec_status));
return rocdec_status;
}
CHECK_VAAPI(vaDestroySurfaces(va_display_, va_surface_ids_.data(), va_surface_ids_.size()));
CHECK_VAAPI(vaDestroyContext(va_display_, va_context_id_));
@@ -314,7 +309,7 @@ rocDecStatus VaapiVideoDecoder::ReconfigureDecoder(RocdecReconfigureDecoderInfo
decoder_create_info_.ulTargetHeight = reconfig_params->ulTargetHeight;
decoder_create_info_.ulTargetWidth = reconfig_params->ulTargetWidth;
rocdec_status = CreateSurfaces();
rocDecStatus rocdec_status = CreateSurfaces();
if (rocdec_status != ROCDEC_SUCCESS) {
ERR("ERROR: Failed to create VAAPI surfaces during the decoder reconfiguration " + TOSTR(rocdec_status));
return rocdec_status;