ref: 4a518655a6b6177d8b6196859a216878b9e0b02a
parent: 2791929e03294a4e6b23d2f102e2c073f21182cb
parent: c4fc6642cf4d6c7cad6f9e50f92583631ebe38b1
author: ruil2 <[email protected]>
date: Tue Jul 15 06:40:33 EDT 2014
Merge pull request #1170 from huili2/reuse_no_param_master reuse dsNoParamSets in dec
--- a/codec/decoder/core/src/au_parser.cpp
+++ b/codec/decoder/core/src/au_parser.cpp
@@ -508,6 +508,8 @@
if (ERR_NONE != iErr) { // modified for pSps/pSubsetSps invalid, 12/1/2009
if (pCtx->iErrorConMethod == ERROR_CON_DISABLE)
pCtx->iErrorCode |= dsNoParamSets;
+ else
+ pCtx->iErrorCode |= dsBitstreamError;
return iErr;
}
@@ -520,6 +522,8 @@
if (ERR_NONE != iErr) { // modified for pps invalid, 12/1/2009
if (pCtx->iErrorConMethod == ERROR_CON_DISABLE)
pCtx->iErrorCode |= dsNoParamSets;
+ else
+ pCtx->iErrorCode |= dsBitstreamError;
return iErr;
}
--- a/codec/decoder/core/src/decoder.cpp
+++ b/codec/decoder/core/src/decoder.cpp
@@ -474,7 +474,8 @@
#else
pCtx->bReferenceLostAtT0Flag = true;
#endif
- ResetParameterSetsState (pCtx);
+ if ((pCtx->iErrorConMethod == ERROR_CON_DISABLE) || (dsOutOfMemory & pCtx->iErrorCode))
+ ResetParameterSetsState (pCtx);
if (dsOutOfMemory & pCtx->iErrorCode) {
return pCtx->iErrorCode;
@@ -489,7 +490,8 @@
#else
pCtx->bReferenceLostAtT0Flag = true;
#endif
- ResetParameterSetsState (pCtx);
+ if ((pCtx->iErrorConMethod == ERROR_CON_DISABLE) || (dsOutOfMemory & pCtx->iErrorCode))
+ ResetParameterSetsState (pCtx);
}
return pCtx->iErrorCode;
}
@@ -532,7 +534,8 @@
#else
pCtx->bReferenceLostAtT0Flag = true;
#endif
- ResetParameterSetsState (pCtx);
+ if ((pCtx->iErrorConMethod == ERROR_CON_DISABLE) || (dsOutOfMemory & pCtx->iErrorCode))
+ ResetParameterSetsState (pCtx);
return pCtx->iErrorCode;
}
}
@@ -567,7 +570,8 @@
#else
pCtx->bReferenceLostAtT0Flag = true;
#endif
- ResetParameterSetsState (pCtx);
+ if ((pCtx->iErrorConMethod == ERROR_CON_DISABLE) || (dsOutOfMemory & pCtx->iErrorCode))
+ ResetParameterSetsState (pCtx);
return pCtx->iErrorCode;
}
}