avcodec/bfi: check for malloc failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/36/head
Piotr Bandurski 12 years ago committed by Michael Niedermayer
parent bb5e7d3b5a
commit 1a3d142f1f
  1. 2
      libavcodec/bfi.c

@ -42,6 +42,8 @@ static av_cold int bfi_decode_init(AVCodecContext *avctx)
BFIContext *bfi = avctx->priv_data;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
bfi->dst = av_mallocz(avctx->width * avctx->height);
if (!bfi->dst)
return AVERROR(ENOMEM);
return 0;
}

Loading…
Cancel
Save