History

avoid encoder crash with random pixel input

dongzha committed 12 years ago

Commit 3596b6c1 parent d3dc48d1 file · +3 −0Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+3−0
@@ -2965,6 +2965,9 @@ bool CheckFrameSkipBasedMaxbr (sWelsEncCtx* pCtx, int32_t iSpatialNum) { · 2964 unmodified lines
29652965 * \return EFrameType (videoFrameTypeIDR/videoFrameTypeI/videoFrameTypeP)
29662966 */
29672967 int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSourcePicture* pSrcPic) {
2968+ if( pCtx == NULL ) {
2969+ return ENC_RETURN_MEMALLOCERR;
2970+ }
29682971 SLayerBSInfo* pLayerBsInfo = &pFbi->sLayerInfo[0];
29692972 SWelsSvcCodingParam* pSvcParam = pCtx->pSvcParam;
29702973 SSpatialPicIndex* pSpatialIndexMap = &pCtx->sSpatialIndexMap[0];

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