Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all
Unified · Split
| @@ -952,7 +952,7 @@ void FreeMbCache (SMbCache* pMbCache, CMemoryAlign* pMa) { · 951 unmodified lines | ||
| 952 | 952 | } |
| 953 | 953 | } |
| 954 | 954 | |
| 955 | −void FreeDqLayer (SDqLayer* pDq, CMemoryAlign* pMa) { | |
| 955 | +void FreeDqLayer (SDqLayer*& pDq, CMemoryAlign* pMa) { | |
| 956 | 956 | if (NULL == pDq) { |
| 957 | 957 | return; |
| 958 | 958 | } |
| @@ -996,6 +996,9 @@ void FreeDqLayer (SDqLayer* pDq, CMemoryAlign* pMa) { · 37 unmodified lines | ||
| 996 | 996 | |
| 997 | 997 | UninitSlicePEncCtx (pDq, pMa); |
| 998 | 998 | pDq->iMaxSliceNum = 0; |
| 999 | + | |
| 1000 | + pMa->WelsFree (pDq, "pDqLayer"); | |
| 1001 | + pDq = NULL; | |
| 999 | 1002 | } |
| 1000 | 1003 | |
| 1001 | 1004 | |
| @@ -2192,8 +2195,6 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 1190 unmodified lines | ||
| 2192 | 2195 | // pDq layers |
| 2193 | 2196 | if (NULL != pDq) { |
| 2194 | 2197 | FreeDqLayer (pDq, pMa); |
| 2195 | − pMa->WelsFree (pDq, "pDq"); | |
| 2196 | − pDq = NULL; | |
| 2197 | 2198 | pCtx->ppDqLayerList[ilayer] = NULL; |
| 2198 | 2199 | } |
| 2199 | 2200 | ++ ilayer; |