History

fix dump file issue that removing redundant operation

Karina committed 10 years ago

Commit 37e67eb1 parent 8fcef674 files · +10 −15Browse files

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

Unified · Split

codec/encoder/core/src/encoder.cpp+7−4
@@ -401,18 +401,21 @@ EVideoFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum · 400 unmodified lines
401 */401 */
402 402
403extern "C" void DumpDependencyRec (SPicture* pCurPicture, const char* kpFileName, const int8_t kiDid, bool bAppend,403extern "C" void DumpDependencyRec (SPicture* pCurPicture, const char* kpFileName, const int8_t kiDid, bool bAppend,
404 SDqLayer* pDqLayer) {404 SDqLayer* pDqLayer,bool bSimulCastAVC) {
405 WelsFileHandle* pDumpRecFile = NULL;405 WelsFileHandle* pDumpRecFile = NULL;
406 int32_t iWrittenSize = 0;406 int32_t iWrittenSize = 0;
407 const char* openMode = bAppend ? "ab" : "wb";407 const char* openMode = bAppend ? "ab" : "wb";
408 SWelsSPS* pSpsTmp = (kiDid > BASE_DEPENDENCY_ID) ? & (pDqLayer->sLayerInfo.pSubsetSpsP->pSps) :408 SWelsSPS* pSpsTmp = NULL;
409 pDqLayer->sLayerInfo.pSpsP;409 if(bSimulCastAVC ||(kiDid == BASE_DEPENDENCY_ID)) {
410 pSpsTmp = pDqLayer->sLayerInfo.pSpsP;
411 } else {
412 pSpsTmp = &(pDqLayer->sLayerInfo.pSubsetSpsP->pSps);
413 }
410 bool bFrameCroppingFlag = pSpsTmp->bFrameCroppingFlag;414 bool bFrameCroppingFlag = pSpsTmp->bFrameCroppingFlag;
411 SCropOffset* pFrameCrop = &pSpsTmp->sFrameCrop;415 SCropOffset* pFrameCrop = &pSpsTmp->sFrameCrop;
412 416
413 if (NULL == pCurPicture || NULL == kpFileName || kiDid >= MAX_DEPENDENCY_LAYER)417 if (NULL == pCurPicture || NULL == kpFileName || kiDid >= MAX_DEPENDENCY_LAYER)
414 return;418 return;
415
416 if (strlen (kpFileName) > 0) // confirmed_safe_unsafe_usage419 if (strlen (kpFileName) > 0) // confirmed_safe_unsafe_usage
417 pDumpRecFile = WelsFopen (kpFileName, openMode);420 pDumpRecFile = WelsFopen (kpFileName, openMode);
418 else {421 else {

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