Browse Source

lcl: Check memory allocation

tags/n2.7
Vittorio Giovara Luca Barbato 10 years ago
parent
commit
8df5fbf0b0
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/lclenc.c

+ 2
- 0
libavcodec/lclenc.c View File

@@ -135,6 +135,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
assert(avctx->width && avctx->height);

avctx->extradata= av_mallocz(8);
if (!avctx->extradata)
return AVERROR(ENOMEM);

avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)


Loading…
Cancel
Save