mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avcodec: Use av_reallocp where suitable
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
committed by
Martin Storsjö
parent
d4f1188d1a
commit
9b8d11a76a
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user