Commit 10531d48 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '7fccc96d'

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

Conflicts:
	libavcodec/eatgv.c

See: a5615b82Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 3a8b16f7 7fccc96d
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment