Browse Source

huffyuv: Check memory allocation

tags/n2.7
Vittorio Giovara Luca Barbato 10 years ago
parent
commit
7d2a682691
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/huffyuvenc.c

+ 1
- 1
libavcodec/huffyuvenc.c View File

@@ -155,7 +155,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->version = 2;

avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
if (!avctx->extradata || !avctx->stats_out || !avctx->coded_frame)
return AVERROR(ENOMEM);

avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;


Loading…
Cancel
Save