History

return error for cropping data error

huili2 committed 11 years ago

Commit 56833931 parent bea361a2 files · +5 −2Browse files

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

Unified · Split

codec/decoder/core/src/au_parser.cpp+4−2
@@ -1075,14 +1075,16 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 1074 unmodified lines
10751075 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_right_offset
10761076 pSps->sFrameCrop.iRightOffset = uiCode;
10771077 if ((pSps->sFrameCrop.iLeftOffset + pSps->sFrameCrop.iRightOffset) > ((int32_t)pSps->iMbWidth * 16 / 2)) {
1078− WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "frame_crop_left_offset + frame_crop_right_offset exceeds limits!");
1078+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "frame_crop_left_offset + frame_crop_right_offset exceeds limits!");
1079+ return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_CROPPING_DATA);
10791080 }
10801081 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_top_offset
10811082 pSps->sFrameCrop.iTopOffset = uiCode;
10821083 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_bottom_offset
10831084 pSps->sFrameCrop.iBottomOffset = uiCode;
10841085 if ((pSps->sFrameCrop.iTopOffset + pSps->sFrameCrop.iBottomOffset) > ((int32_t)pSps->iMbHeight * 16 / 2)) {
1085− WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "frame_crop_top_offset + frame_crop_right_offset exceeds limits!");
1086+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "frame_crop_top_offset + frame_crop_right_offset exceeds limits!");
1087+ return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_CROPPING_DATA);
10861088 }
10871089 } else {
10881090 pSps->sFrameCrop.iLeftOffset = 0; // frame_crop_left_offset

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