Showing the changes to codec/decoder/core/src/decode_slice.cpp (1 of 3 files). Show all
Unified · Split
| @@ -403,7 +403,7 @@ int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool_t bFirstSliceInLayer, PN · 402 unmodified lines | ||
| 403 | 403 | |
| 404 | 404 | iNextMbXyIndex = pSliceHeader->iFirstMbInSlice; |
| 405 | 405 | |
| 406 | − if (iNextMbXyIndex >= kiCountNumMb) { | |
| 406 | + if (iNextMbXyIndex < 0 || iNextMbXyIndex >= kiCountNumMb) { | |
| 407 | 407 | WelsLog (pCtx, WELS_LOG_ERROR, |
| 408 | 408 | "WelsDecodeSlice()::iFirstMbInSlice(%d) > pSps->kiTotalMb(%d). ERROR!!! resolution change....\n", |
| 409 | 409 | iNextMbXyIndex, kiCountNumMb); |