ref: a53377314a39495b20fc17bdd49f03ddf678e206
parent: 6607f43aab67702af5b7232a6b7d7aeb5e5dc257
author: Licai Guo <[email protected]>
date: Tue Jan 21 14:13:46 EST 2014
fix issues found by coverage scan
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -768,7 +768,6 @@
} else if (uiQualityId > BASE_QUALITY_ID) {
WelsLog (pCtx, WELS_LOG_WARNING, "MGS not supported.\n");
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MGS);
- pSliceHeadExt->uiRefLayerDqId = pNalHeaderExt->uiLayerDqId - 1;
} else {
pSliceHeadExt->uiRefLayerDqId = (uint8_t) - 1;
}
@@ -1775,7 +1774,7 @@
}
GetI4LumaIChromaAddrTable (pCtx->iDecBlockOffsetArray, pCtx->pDec->iLinesize[0], pCtx->pDec->iLinesize[1]);
- if (pNalCur->sNalHeaderExt.uiLayerDqId > kuiTargetLayerDqId) {
+ if ((pNalCur == NULL) || (pNalCur->sNalHeaderExt.uiLayerDqId > kuiTargetLayerDqId)) {
break; // Per formance it need not to decode the remaining bits any more due to given uiLayerDqId required, 9/2/2009
}
--- a/codec/decoder/plus/src/welsCodecTrace.cpp
+++ b/codec/decoder/plus/src/welsCodecTrace.cpp
@@ -342,7 +342,7 @@
break;
default:
if (m_fpDebugTrace)
- m_fpInfoTrace ("%s", pStr);
+ m_fpDebugTrace ("%s", pStr);
break;
}
#else