History

fix crash caused by empty packets and add more checks

Licai Guo committed 12 years ago

Commit 1a046941 parent 306a1da3 files · +4 −3Browse files

Showing the changes to codec/decoder/core/src/decode_slice.cpp (1 of 3 files). Show all

Unified · Split

codec/decoder/core/src/decode_slice.cpp+1−1
@@ -403,7 +403,7 @@ int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool_t bFirstSliceInLayer, PN · 402 unmodified lines
403403
404404 iNextMbXyIndex = pSliceHeader->iFirstMbInSlice;
405405
406− if (iNextMbXyIndex >= kiCountNumMb) {
406+ if (iNextMbXyIndex < 0 || iNextMbXyIndex >= kiCountNumMb) {
407407 WelsLog (pCtx, WELS_LOG_ERROR,
408408 "WelsDecodeSlice()::iFirstMbInSlice(%d) > pSps->kiTotalMb(%d). ERROR!!! resolution change....\n",
409409 iNextMbXyIndex, kiCountNumMb);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t