History

add protection

dongzha committed 11 years ago

Commit ac061fe1 parent 091e5cb1 file · +2 −2Browse files

Showing the changes to codec/decoder/core/src/error_concealment.cpp (1 of 1 file). Show all

Unified · Split

codec/decoder/core/src/error_concealment.cpp+2−2
@@ -198,8 +198,8 @@ void DoMbECMvCopy (PWelsDecoderContext pCtx, PPicture pDec, PPicture pRef, int32 · 197 unmodified lines
198198 } else {
199199 iScale0 = pCtx->pECRefPic[0]->iFramePoc - iCurrPoc;
200200 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;
203203 }
204204 pMCRefMem->pDstY = pDst[0];
205205 pMCRefMem->pDstU = pDst[1];

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t