Merge commit '7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8'
* commit '7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8': eatgv: Check memory allocation Conflicts: libavcodec/eatgv.c See: a5615b82eb116e9fd0f71f2b03c333cc31ab706a Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
10531d48a0
@ -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…
x
Reference in New Issue
Block a user