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