Browse Source

noise_bsf: check if allocation failed

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n2.0
Paul B Mahol 13 years ago
parent
commit
67f9bbbb3f
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/noise_bsf.c

+ 2
- 0
libavcodec/noise_bsf.c View File

@@ -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