Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 29 files). Show all
Unified · Split
| @@ -3366,11 +3366,11 @@ int32_t WritePadding (sWelsEncCtx* pCtx, int32_t iLen, int32_t& iSize) { · 3365 unmodified lines | ||
| 3366 | 3366 | iNal = pCtx->pOut->iNalIndex; |
| 3367 | 3367 | pBs = &pCtx->pOut->sBsWrite; // SBitStringAux instance for non VCL NALs decoding |
| 3368 | 3368 | |
| 3369 | − if ((pBs->pBufEnd - pBs->pBufPtr) < iLen || iNal >= pCtx->pOut->iCountNals) { | |
| 3369 | + if ((pBs->pEndBuf - pBs->pCurBuf) < iLen || iNal >= pCtx->pOut->iCountNals) { | |
| 3370 | 3370 | #if GOM_TRACE_FLAG |
| 3371 | 3371 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, |
| 3372 | 3372 | "[RC] paddingcal pBuffer overflow, bufferlen=%lld, paddinglen=%d, iNalIdx= %d, iCountNals= %d", |
| 3373 | − static_cast<long long int> (pBs->pBufEnd - pBs->pBufPtr), iLen, iNal, pCtx->pOut->iCountNals); | |
| 3373 | + static_cast<long long int> (pBs->pEndBuf - pBs->pCurBuf), iLen, iNal, pCtx->pOut->iCountNals); | |
| 3374 | 3374 | #endif |
| 3375 | 3375 | return ENC_RETURN_MEMOVERFLOWFOUND; |
| 3376 | 3376 | } |