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
952952 }
953953 }
954954
955−void FreeDqLayer (SDqLayer* pDq, CMemoryAlign* pMa) {
955+void FreeDqLayer (SDqLayer*& pDq, CMemoryAlign* pMa) {
956956 if (NULL == pDq) {
957957 return;
958958 }
@@ -996,6 +996,9 @@ void FreeDqLayer (SDqLayer* pDq, CMemoryAlign* pMa) { · 37 unmodified lines
996996
997997 UninitSlicePEncCtx (pDq, pMa);
998998 pDq->iMaxSliceNum = 0;
999+
1000+ pMa->WelsFree (pDq, "pDqLayer");
1001+ pDq = NULL;
9991002 }
10001003
10011004
@@ -2192,8 +2195,6 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 1190 unmodified lines
21922195 // pDq layers
21932196 if (NULL != pDq) {
21942197 FreeDqLayer (pDq, pMa);
2195− pMa->WelsFree (pDq, "pDq");
2196− pDq = NULL;
21972198 pCtx->ppDqLayerList[ilayer] = NULL;
21982199 }
21992200 ++ 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