History

add log for further digging on parser crash

huili2 committed 9 years ago

Commit 81773221 parent e1a27c91 file · +6 −5Browse files

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

Unified · Split

codec/decoder/core/src/decoder_core.cpp+6−5
@@ -131,8 +131,9 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 130 unmodified lines
131131 pParser->iNalLenInByte [pParser->iNalNum ++] = iNalLen;
132132 if (pDstBuf - pParser->pDstBuff + iNalLen >= MAX_ACCESS_UNIT_CAPACITY) {
133133 WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR,
134− "DecodeFrameConstruction(): composed output size (%ld) exceeds (%d). Failed to parse. \n",
135− (long) (pDstBuf - pParser->pDstBuff + iNalLen), MAX_ACCESS_UNIT_CAPACITY);
134+ "DecodeFrameConstruction(): composed output size (%ld) exceeds (%d). Failed to parse. current data pos %d out of %d:, previously accumulated num: %d, total num: %d, previously accumulated len: %d, current len: %d, current buf pos: %p, header buf pos: %p \n",
135+ (long) (pDstBuf - pParser->pDstBuff + iNalLen), MAX_ACCESS_UNIT_CAPACITY, iIdx, iEndIdx, iNum, pParser->iNalNum,
136+ iTotalNalLen, iNalLen, pDstBuf, pParser->pDstBuff);
136137 pCtx->iErrorCode |= dsOutOfMemory;
137138 pCtx->pParserBsInfo->iNalNum = 0;
138139 return ERR_INFO_OUT_OF_MEMORY;
@@ -2260,11 +2261,11 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 2121 unmodified lines
22602261 if (ERR_NONE != iRet) {
22612262 if (iRet == ERR_INFO_OUT_OF_MEMORY) {
22622263 pCtx->iErrorCode |= dsOutOfMemory;
2263− WelsLog (&(pCtx->sLogCtx), WELS_LOG_ERROR, "DecodeCurrentAccessUnit(), Fmo param alloc failed");
2264+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "DecodeCurrentAccessUnit(), Fmo param alloc failed");
22642265 } else {
22652266 pCtx->iErrorCode |= dsBitstreamError;
2266− WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "DecodeCurrentAccessUnit(), FmoParamUpdate failed, eSliceType: %d.",
2267− pSh->eSliceType);
2267+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "DecodeCurrentAccessUnit(), FmoParamUpdate failed, eSliceType: %d.",
2268+ pSh->eSliceType);
22682269 }
22692270 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_FMO_INIT_FAIL);
22702271 }

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