diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-01 01:44:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-01 01:45:39 +0200 |
commit | 10531d48a0f91aea57eac7e1c6cf5857e601826e (patch) | |
tree | 26421260f81ec4463757f28e446910bf437cb02e | |
parent | 3a8b16f78e8bf35328f9d70506c1205bb258792c (diff) | |
parent | 7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8 (diff) | |
download | ffmpeg-10531d48a0f91aea57eac7e1c6cf5857e601826e.tar.gz |
Merge commit '7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8'
* commit '7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8':
eatgv: Check memory allocation
Conflicts:
libavcodec/eatgv.c
See: a5615b82eb116e9fd0f71f2b03c333cc31ab706a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/eatgv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c index b4d3d1d27d..835ff15168 100644 --- a/libavcodec/eatgv.c +++ b/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; } |