noise_bsf: check if allocation failed
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
8263726c69
commit
67f9bbbb3f
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue