ref: e95d1f16f48570d8ab2fea54384931357f7d094f
parent: dd5b9b89f6c0162cb8c47038d477cca35189096e
parent: f9152e6f40962862b9a29aeef65c6d06a853f9f3
author: huili2 <[email protected]>
date: Fri Jun 20 13:59:06 EDT 2014
Merge pull request #994 from huili2/fix_sps_crash_with_ec sps storage bug fix for error bitstream
--- a/codec/decoder/core/src/au_parser.cpp
+++ b/codec/decoder/core/src/au_parser.cpp
@@ -1013,6 +1013,9 @@
pCtx->bAuReadyFlag = true;
pCtx->pAccessUnitList->uiEndPos = pCtx->pAccessUnitList->uiAvailUnitsNum - 1;
pCtx->iOverwriteFlags |= OVERWRITE_SUBSETSPS;
+ } else if ((pCtx->pSps != NULL) && (pCtx->pSps->iSpsId == pSubsetSps->sSps.iSpsId)) {
+ memcpy (&pCtx->sSubsetSpsBuffer[MAX_SPS_COUNT], pSubsetSps, sizeof (SSubsetSps));
+ pCtx->iOverwriteFlags |= OVERWRITE_SUBSETSPS;
} else {
memcpy (&pCtx->sSubsetSpsBuffer[iSpsId], pSubsetSps, sizeof (SSubsetSps));
}
@@ -1024,6 +1027,9 @@
pCtx->iOverwriteFlags |= OVERWRITE_SPS;
pCtx->bAuReadyFlag = true;
pCtx->pAccessUnitList->uiEndPos = pCtx->pAccessUnitList->uiAvailUnitsNum - 1;
+ } else if ((pCtx->pSps != NULL) && (pCtx->pSps->iSpsId == pSps->iSpsId)) {
+ memcpy (&pCtx->sSpsBuffer[MAX_SPS_COUNT], pSps, sizeof (SSps));
+ pCtx->iOverwriteFlags |= OVERWRITE_SPS;
} else {
memcpy (&pCtx->sSpsBuffer[iSpsId], pSps, sizeof (SSps));
}