Showing the changes to codec/decoder/plus/src (1 of 5 files). Show all
Unified · Split
| @@ -49,6 +49,7 @@ · 48 unmodified lines | |||
| 49 | 49 | ||
| 50 | //#include "macros.h" | 50 | //#include "macros.h" |
| 51 | #include "decoder.h" | 51 | #include "decoder.h" |
| 52 | #include "decoder_core.h" | ||
| 52 | 53 | ||
| 53 | extern "C" { | 54 | extern "C" { |
| 54 | #include "decoder_core.h" | 55 | #include "decoder_core.h" |
| @@ -322,11 +323,7 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 267 unmodified lines | |||
| 322 | const int kiSrcLen, | 323 | const int kiSrcLen, |
| 323 | unsigned char** ppDst, | 324 | unsigned char** ppDst, |
| 324 | SBufferInfo* pDstInfo) { | 325 | SBufferInfo* pDstInfo) { |
| 325 | if (kiSrcLen > MAX_ACCESS_UNIT_CAPACITY - MAX_MACROBLOCK_CAPACITY) {//prevent from residual reading overflow | 326 | if (CheckBsBuffer (m_pDecContext, kiSrcLen)) { |
| 326 | m_pDecContext->iErrorCode |= dsOutOfMemory; | ||
| 327 | IWelsTrace::WelsVTrace (m_pTrace, IWelsTrace::WELS_LOG_INFO, | ||
| 328 | "max AU size exceeded. Allowed size = %d, current size = %d", | ||
| 329 | MAX_ACCESS_UNIT_CAPACITY - MAX_MACROBLOCK_CAPACITY, kiSrcLen); | ||
| 330 | return dsOutOfMemory; | 327 | return dsOutOfMemory; |
| 331 | } | 328 | } |
| 332 | if (kiSrcLen > 0 && kpSrc != NULL) { | 329 | if (kiSrcLen > 0 && kpSrc != NULL) { |