Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 2 files). Show all
Unified · Split
| @@ -2061,8 +2061,12 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 2060 unmodified lines | ||
| 2061 | 2061 | } |
| 2062 | 2062 | } |
| 2063 | 2063 | } |
| 2064 | − if (bAllRefComplete && (pCtx->sRefPic.uiRefCount[LIST_0] > 0 || pCtx->eSliceType != I_SLICE)) { | |
| 2065 | − bAllRefComplete &= bCheckRefPicturesComplete (pCtx); | |
| 2064 | + if (bAllRefComplete && pCtx->eSliceType != I_SLICE) { | |
| 2065 | + if (pCtx->sRefPic.uiRefCount[LIST_0] > 0) { | |
| 2066 | + bAllRefComplete &= CheckRefPicturesComplete (pCtx); | |
| 2067 | + } else { | |
| 2068 | + bAllRefComplete = false; | |
| 2069 | + } | |
| 2066 | 2070 | } |
| 2067 | 2071 | } |
| 2068 | 2072 | #if defined (_DEBUG) && !defined (CODEC_FOR_TESTBED) |
| @@ -2182,7 +2186,7 @@ bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferIn · 113 unmodified lines | ||
| 2182 | 2186 | return ERR_NONE; |
| 2183 | 2187 | } |
| 2184 | 2188 | |
| 2185 | −bool bCheckRefPicturesComplete (PWelsDecoderContext pCtx) { | |
| 2189 | +bool CheckRefPicturesComplete (PWelsDecoderContext pCtx) { | |
| 2186 | 2190 | // Multi Reference, RefIdx may differ |
| 2187 | 2191 | bool bAllRefComplete = true; |
| 2188 | 2192 | int32_t iRealMbIdx; |