Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2965,6 +2965,9 @@ bool CheckFrameSkipBasedMaxbr (sWelsEncCtx* pCtx, int32_t iSpatialNum) { · 2964 unmodified lines | ||
| 2965 | 2965 | * \return EFrameType (videoFrameTypeIDR/videoFrameTypeI/videoFrameTypeP) |
| 2966 | 2966 | */ |
| 2967 | 2967 | int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSourcePicture* pSrcPic) { |
| 2968 | + if( pCtx == NULL ) { | |
| 2969 | + return ENC_RETURN_MEMALLOCERR; | |
| 2970 | + } | |
| 2968 | 2971 | SLayerBSInfo* pLayerBsInfo = &pFbi->sLayerInfo[0]; |
| 2969 | 2972 | SWelsSvcCodingParam* pSvcParam = pCtx->pSvcParam; |
| 2970 | 2973 | SSpatialPicIndex* pSpatialIndexMap = &pCtx->sSpatialIndexMap[0]; |