Showing the changes to codec/encoder/core/src/encoder.cpp (1 of 4 files). Show all
Unified · Split
| @@ -401,18 +401,21 @@ EVideoFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum · 400 unmodified lines | |||
| 401 | */ | 401 | */ |
| 402 | 402 | ||
| 403 | extern "C" void DumpDependencyRec (SPicture* pCurPicture, const char* kpFileName, const int8_t kiDid, bool bAppend, | 403 | extern "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_usage | 419 | if (strlen (kpFileName) > 0) // confirmed_safe_unsafe_usage |
| 417 | pDumpRecFile = WelsFopen (kpFileName, openMode); | 420 | pDumpRecFile = WelsFopen (kpFileName, openMode); |
| 418 | else { | 421 | else { |