Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 1 file). Show all
Unified · Split
| @@ -228,6 +228,14 @@ static int32_t DecreasePicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, co · 227 unmodified lines | ||
| 228 | 228 | pPicNewBuf->ppPic[i]->uiRefCount = 0; |
| 229 | 229 | pPicNewBuf->ppPic[i]->bAvailableFlag = true; |
| 230 | 230 | pPicNewBuf->ppPic[i]->bIsComplete = false; |
| 231 | + //remove references | |
| 232 | + for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) { | |
| 233 | + uint32_t i = 0; | |
| 234 | + while (i < MAX_DPB_COUNT && pPicNewBuf->ppPic[i]->pRefPic[listIdx][i]) { | |
| 235 | + pPicNewBuf->ppPic[i]->pRefPic[listIdx][i] = 0; | |
| 236 | + ++i; | |
| 237 | + } | |
| 238 | + } | |
| 231 | 239 | } |
| 232 | 240 | // remove old PicBuf |
| 233 | 241 | if (pPicOldBuf->ppPic != NULL) { |