Commit 7fccc96d authored by Vittorio Giovara's avatar Vittorio Giovara Committed by Luca Barbato

eatgv: Check memory allocation

parent 69277069
......@@ -173,7 +173,9 @@ static int tgv_decode_inter(TgvContext *s, AVFrame *frame,
/* allocate codebook buffers as necessary */
if (num_mvs > s->num_mvs) {
s->mv_codebook = av_realloc(s->mv_codebook, num_mvs*2*sizeof(int));
int err = av_reallocp(&s->mv_codebook, num_mvs * 2 * sizeof(int));
if (err < 0)
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