Showing the changes to codec/decoder/core/src/pic_queue.cpp (1 of 4 files). Show all
Unified · Split
| @@ -111,8 +111,8 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const · 110 unmodified lines | ||
| 111 | 111 | uint32_t uiMbWidth = (kiPicWidth + 15) >> 4; |
| 112 | 112 | uint32_t uiMbHeight = (kiPicHeight + 15) >> 4; |
| 113 | 113 | uint32_t uiMbCount = uiMbWidth * uiMbHeight; |
| 114 | − pPic->pMbType = (uint32_t*)pMa->WelsMallocz (uiMbCount * sizeof (uint32_t), | |
| 115 | − "pPic->pMbType"); | |
| 114 | + pPic->pMbCorrectlyDecodedFlag = (bool*)pMa->WelsMallocz (uiMbCount * sizeof (bool), "pPic->pMbCorrectlyDecodedFlag"); | |
| 115 | + pPic->pMbType = (uint32_t*)pMa->WelsMallocz (uiMbCount * sizeof (uint32_t), "pPic->pMbType"); | |
| 116 | 116 | pPic->pMv[LIST_0] = (int16_t (*)[16][2])pMa->WelsMallocz (uiMbCount * sizeof ( |
| 117 | 117 | int16_t) * MV_A * MB_BLOCK4x4_NUM, "pPic->pMv[]"); |
| 118 | 118 | pPic->pMv[LIST_1] = (int16_t (*)[16][2])pMa->WelsMallocz (uiMbCount * sizeof ( |
| @@ -140,6 +140,11 @@ void FreePicture (PPicture pPic, CMemoryAlign* pMa) { · 21 unmodified lines | ||
| 140 | 140 | pPic->pBuffer[0] = NULL; |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | + if (pPic->pMbCorrectlyDecodedFlag) { | |
| 144 | + pMa->WelsFree (pPic->pMbCorrectlyDecodedFlag, "pPic->pMbCorrectlyDecodedFlag"); | |
| 145 | + pPic->pMbCorrectlyDecodedFlag = NULL; | |
| 146 | + } | |
| 147 | + | |
| 143 | 148 | if (pPic->pMbType) { |
| 144 | 149 | pMa->WelsFree (pPic->pMbType, "pPic->pMbType"); |
| 145 | 150 | pPic->pMbType = NULL; |