mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 20:19:55 +00:00
eatgv: Check memory allocation
This commit is contained in:
parent
69277069dd
commit
7fccc96dc3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user