aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/eatgv.c
diff options
context:
space:
mode:
authorAlexandra Khirnova <alexandra.khirnova@gmail.com>2013-12-06 13:44:17 +0100
committerMartin Storsjö <martin@martin.st>2013-12-09 12:27:51 +0200
commit9b8d11a76ae7bca8bbb58abb822138f8b42c776c (patch)
tree702aed7eb0e0684c7a91fdac06a9981fb4333c49 /libavcodec/eatgv.c
parentd4f1188d1a662fed5347e70016da49e01563e8a8 (diff)
downloadffmpeg-9b8d11a76ae7bca8bbb58abb822138f8b42c776c.tar.gz
avcodec: Use av_reallocp where suitable
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/eatgv.c')
-rw-r--r--libavcodec/eatgv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c
index 7ab18c57b0..3bc650665c 100644
--- a/libavcodec/eatgv.c
+++ b/libavcodec/eatgv.c
@@ -178,7 +178,11 @@ static int tgv_decode_inter(TgvContext *s, AVFrame *frame,
}
if (num_blocks_packed > s->num_blocks_packed) {
- s->block_codebook = av_realloc(s->block_codebook, num_blocks_packed*16);
+ int err;
+ if ((err = av_reallocp(&s->block_codebook, num_blocks_packed * 16)) < 0) {
+ s->num_blocks_packed = 0;
+ return err;
+ }
s->num_blocks_packed = num_blocks_packed;
}