ref: cbe5acfbab50a1f6174cace440d5ad111d82aeec
parent: 6482d7b9cde9051607964b77758837f93141457a
author: xiaotiansf <xiaotianshimail@gmail.com>
date: Tue Jul 23 05:07:36 EDT 2019
re-fix oss-buzz bug 14423.
--- a/codec/decoder/core/src/decoder.cpp
+++ b/codec/decoder/core/src/decoder.cpp
@@ -210,22 +210,12 @@
}
//update references due to allocation changes
+ //all references' references have to be reset oss-buzz 14423
for (int32_t i = 0; i < kiNewSize; i++) {
for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
int32_t j = -1;
while (++j < MAX_DPB_COUNT && pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] != NULL) {
- unsigned long long uiTimeStamp = pPicNewBuf->ppPic[i]->pRefPic[listIdx][j]->uiTimeStamp;
- bool foundThePic = false;
- for (int32_t k = 0; k < kiNewSize; k++) {
- if (pPicNewBuf->ppPic[k]->uiTimeStamp == uiTimeStamp) {
- pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] = pPicNewBuf->ppPic[k];
- foundThePic = true;
- break;
- }
- }
- if (!foundThePic) {
- pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] = NULL;
- }
+ pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] = NULL;
}
}
}