mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
noise_bsf: check if allocation failed
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
8263726c69
commit
67f9bbbb3f
@ -36,6 +36,8 @@ static int noise(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const ch
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
*poutbuf= av_malloc(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!*poutbuf)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
memcpy(*poutbuf, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
for(i=0; i<buf_size; i++){
|
||||
|
Loading…
Reference in New Issue
Block a user