History

use WELS_DELETE_OP for deleting

sijchen committed 10 years ago

Commit e07ee9c1 parent 74955c84 files · +17 −35Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+2−4
@@ -2285,8 +2285,7 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 2284 unmodified lines
2285 if ((*ppCtx)->pMemAlign != NULL) {2285 if ((*ppCtx)->pMemAlign != NULL) {
2286 WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "FreeMemorySvc(), verify memory usage (%d bytes) after free..",2286 WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "FreeMemorySvc(), verify memory usage (%d bytes) after free..",
2287 (*ppCtx)->pMemAlign->WelsGetMemoryUsage());2287 (*ppCtx)->pMemAlign->WelsGetMemoryUsage());
2288 delete (*ppCtx)->pMemAlign;2288 WELS_DELETE_OP((*ppCtx)->pMemAlign);
2289 (*ppCtx)->pMemAlign = NULL;
2290 }2289 }
2291 2290
2292 free (*ppCtx);2291 free (*ppCtx);
@@ -2474,8 +2473,7 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) { · 181 unmodified lines
2474 2473
2475 if ((*ppCtx)->pVpp) {2474 if ((*ppCtx)->pVpp) {
2476 (*ppCtx)->pVpp->FreeSpatialPictures (*ppCtx);2475 (*ppCtx)->pVpp->FreeSpatialPictures (*ppCtx);
2477 delete (*ppCtx)->pVpp;2476 WELS_DELETE_OP((*ppCtx)->pVpp);
2478 (*ppCtx)->pVpp = NULL;
2479 }2477 }
2480 FreeMemorySvc (ppCtx);2478 FreeMemorySvc (ppCtx);
2481 *ppCtx = NULL;2479 *ppCtx = NULL;

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