Merge commit '7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8'

* commit '7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8':
  eatgv: Check memory allocation

Conflicts:
	libavcodec/eatgv.c

See: a5615b82eb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/136/head
Michael Niedermayer 10 years ago
commit 10531d48a0
  1. 5
      libavcodec/eatgv.c

@ -173,9 +173,10 @@ static int tgv_decode_inter(TgvContext *s, AVFrame *frame,
/* allocate codebook buffers as necessary */
if (num_mvs > s->num_mvs) {
if (av_reallocp_array(&s->mv_codebook, num_mvs, sizeof(*s->mv_codebook))) {
int err = av_reallocp_array(&s->mv_codebook, num_mvs, sizeof(*s->mv_codebook));
if (err < 0) {
s->num_mvs = 0;
return AVERROR(ENOMEM);
return err;
}
s->num_mvs = num_mvs;
}

Loading…
Cancel
Save