[fix] fix getting wrong resolution when using decoder->GetWidth() and decoder->GetHeight() for nv decoder

This commit is contained in:
dijunkun
2025-03-10 22:41:10 +08:00
parent 8b4ff8cd1f
commit 7f2ebbde5a

View File

@@ -474,6 +474,10 @@ int NvDecoder::ReconfigureDecoder(CUVIDEOFORMAT *pVideoFormat) {
reconfigParams.ulTargetWidth = m_nSurfaceWidth;
reconfigParams.ulTargetHeight = m_nSurfaceHeight;
if (bDecodeResChange) {
setReconfigParams(&m_cropRect, &m_resizeDim);
}
// If external reconfigure is called along with resolution change even if post
// processing params is not changed, do full reconfigure params update
if ((m_bReconfigExternal && bDecodeResChange) || m_bReconfigExtPPChange) {