History

1. use WELS_CLIP1 to replace table look-up; 2. fix bugs about buffer overflow 3. add more boundary checks

Licai Guo committed 12 years ago

Commit fc56c7d1 parent 99412b07 files · +106 −79Browse files

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

Unified · Split

codec/decoder/core/src/decoder_core.cpp+5−0
@@ -519,6 +519,11 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 518 unmodified lines
519 if (uiSliceType > 4)519 if (uiSliceType > 4)
520 uiSliceType -= 5;520 uiSliceType -= 5;
521 521
522 if((eNalType == NAL_UNIT_CODED_SLICE_IDR) && (uiSliceType != 2)){
523 WelsLog (pCtx, WELS_LOG_WARNING, "Invalid slice type(%d) in IDR picture. \n", uiSliceType);
524 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE);
525 }
526
522 if (kbExtensionFlag) {527 if (kbExtensionFlag) {
523 if (uiSliceType > 2) {528 if (uiSliceType > 2) {
524 WelsLog (pCtx, WELS_LOG_WARNING, "Invalid slice type(%d).\n", uiSliceType);529 WelsLog (pCtx, WELS_LOG_WARNING, "Invalid slice type(%d).\n", uiSliceType);

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