noise_bsf: check if allocation failed

Signed-off-by: Paul B Mahol <onemda@gmail.com>
pull/13/merge
Paul B Mahol 12 years ago
parent 8263726c69
commit 67f9bbbb3f
  1. 2
      libavcodec/noise_bsf.c

@ -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…
Cancel
Save