History

re-fix oss-buzz bug 14423.

xiaotiansf committed 7 years ago

Commit cbe5acf1 parent 6482d7b1 file · +2 −12Browse files

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

Unified · Split

codec/decoder/core/src/decoder.cpp+2−12
@@ -210,22 +210,12 @@ static int32_t DecreasePicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, co · 209 unmodified lines
210210 }
211211
212212 //update references due to allocation changes
213+ //all references' references have to be reset oss-buzz 14423
213214 for (int32_t i = 0; i < kiNewSize; i++) {
214215 for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
215216 int32_t j = -1;
216217 while (++j < MAX_DPB_COUNT && pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] != NULL) {
217− unsigned long long uiTimeStamp = pPicNewBuf->ppPic[i]->pRefPic[listIdx][j]->uiTimeStamp;
218− bool foundThePic = false;
219− for (int32_t k = 0; k < kiNewSize; k++) {
220− if (pPicNewBuf->ppPic[k]->uiTimeStamp == uiTimeStamp) {
221− pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] = pPicNewBuf->ppPic[k];
222− foundThePic = true;
223− break;
224− }
225− }
226− if (!foundThePic) {
227− pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] = NULL;
228− }
218+ pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] = NULL;
229219 }
230220 }
231221 }

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