History

additional fix for ossz-buzz bug 13457.

xiaotiansf committed 7 years ago

Commit cfb22041 parent 4227bea1 file · +9 −9Browse 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+9−9
@@ -167,20 +167,20 @@ static int32_t IncreasePicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, co · 166 unmodified lines
167 167
168static void ResetRefPicReferences (const PWelsDecoderContext& pCtx, const PPicture& inPPic) {168static void ResetRefPicReferences (const PWelsDecoderContext& pCtx, const PPicture& inPPic) {
169 //seach and reset the references of deleted references.169 //seach and reset the references of deleted references.
170 if (pCtx->eSliceType != B_SLICE) {170 int32_t list_count = pCtx->eSliceType == B_SLICE ? 2 : 1;
171 return;171 for (int32_t list = LIST_0; list < list_count; ++list) {
172 }
173 for (int32_t list = LIST_0; list < LIST_A; ++list) {
174 int32_t refIdx = 0;172 int32_t refIdx = 0;
175 PPicture pPic = pCtx->sRefPic.pRefList[list][refIdx];173 PPicture pPic = pCtx->sRefPic.pRefList[list][refIdx];
176 while (refIdx < MAX_DPB_COUNT && pPic != NULL) {174 while (refIdx < MAX_DPB_COUNT && pPic != NULL) {
177 ++refIdx;175 ++refIdx;
178 int32_t ref = 0;176 for (int32_t i = LIST_0; i < LIST_A; ++i) {
179 while (ref < MAX_DPB_COUNT && *pPic->pRefPic[ref] != NULL) {177 int32_t ref = 0;
180 if (*pPic->pRefPic[ref] == inPPic) {178 while (ref < MAX_DPB_COUNT && pPic->pRefPic[i][ref] != NULL) {
181 *pPic->pRefPic[ref] = NULL;179 if (pPic->pRefPic[i][ref] == inPPic) {
180 pPic->pRefPic[i][ref] = NULL;
181 }
182 ++ref;
182 }183 }
183 ++ref;
184 }184 }
185 }185 }
186 }186 }

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