Showing the changes to codec/decoder/core/src/error_concealment.cpp (1 of 1 file). Show all
Unified · Split
| @@ -198,8 +198,8 @@ void DoMbECMvCopy (PWelsDecoderContext pCtx, PPicture pDec, PPicture pRef, int32 · 197 unmodified lines | ||
| 198 | 198 | } else { |
| 199 | 199 | iScale0 = pCtx->pECRefPic[0]->iFramePoc - iCurrPoc; |
| 200 | 200 | iScale1 = pRef->iFramePoc - iCurrPoc; |
| 201 | − iMVs[0] = pCtx->iECMVs[0][0] * iScale1 / iScale0; | |
| 202 | − iMVs[1] = pCtx->iECMVs[0][1] * iScale1 / iScale0; | |
| 201 | + iMVs[0] = iScale0 == 0 ? 0 : pCtx->iECMVs[0][0] * iScale1 / iScale0; | |
| 202 | + iMVs[1] = iScale0 == 0 ? 0 : pCtx->iECMVs[0][1] * iScale1 / iScale0; | |
| 203 | 203 | } |
| 204 | 204 | pMCRefMem->pDstY = pDst[0]; |
| 205 | 205 | pMCRefMem->pDstU = pDst[1]; |