History

include the free-ing of pointer into FreeDqLayer

sijchen committed 10 years ago

Commit 2b9a2501 parent a1a38731 file · +4 −3Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+4−3
@@ -952,7 +952,7 @@ void FreeMbCache (SMbCache* pMbCache, CMemoryAlign* pMa) { · 951 unmodified lines
952 }952 }
953}953}
954 954
955void FreeDqLayer (SDqLayer* pDq, CMemoryAlign* pMa) {955void FreeDqLayer (SDqLayer*& pDq, CMemoryAlign* pMa) {
956 if (NULL == pDq) {956 if (NULL == pDq) {
957 return;957 return;
958 }958 }
@@ -996,6 +996,9 @@ void FreeDqLayer (SDqLayer* pDq, CMemoryAlign* pMa) { · 37 unmodified lines
996 996
997 UninitSlicePEncCtx (pDq, pMa);997 UninitSlicePEncCtx (pDq, pMa);
998 pDq->iMaxSliceNum = 0;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 // pDq layers2195 // pDq layers
2193 if (NULL != pDq) {2196 if (NULL != pDq) {
2194 FreeDqLayer (pDq, pMa);2197 FreeDqLayer (pDq, pMa);
2195 pMa->WelsFree (pDq, "pDq");
2196 pDq = NULL;
2197 pCtx->ppDqLayerList[ilayer] = NULL;2198 pCtx->ppDqLayerList[ilayer] = NULL;
2198 }2199 }
2199 ++ ilayer;2200 ++ ilayer;

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