Showing the changes to codec/decoder/core/src/decode_slice.cpp (1 of 5 files). Show all
Unified · Split
| @@ -62,9 +62,15 @@ static bool CheckRefPics (const PWelsDecoderContext& pCtx) { · 61 unmodified lines | ||
| 62 | 62 | ++listCount; |
| 63 | 63 | } |
| 64 | 64 | for (int32_t list = LIST_0; list < listCount; ++list) { |
| 65 | − int32_t refCount = pCtx->sRefPic.uiRefCount[list]; | |
| 66 | − for (int32_t refIdx = 0; refIdx < refCount; ++refIdx) { | |
| 67 | − if (!pCtx->sRefPic.pRefList[list][refIdx]) { | |
| 65 | + int32_t shortRefCount = pCtx->sRefPic.uiShortRefCount[list]; | |
| 66 | + for (int32_t refIdx = 0; refIdx < shortRefCount; ++refIdx) { | |
| 67 | + if (!pCtx->sRefPic.pShortRefList[list][refIdx]) { | |
| 68 | + return false; | |
| 69 | + } | |
| 70 | + } | |
| 71 | + int32_t longRefCount = pCtx->sRefPic.uiLongRefCount[list]; | |
| 72 | + for (int32_t refIdx = 0; refIdx < longRefCount; ++refIdx) { | |
| 73 | + if (!pCtx->sRefPic.pLongRefList[list][refIdx]) { | |
| 68 | 74 | return false; |
| 69 | 75 | } |
| 70 | 76 | } |