libvpxenc: Replace av_realloc by av_realloc_f when relevant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 769298a686
)
This commit is contained in:
committed by
Michael Niedermayer
parent
bbb191c721
commit
acfe2c9154
@@ -481,7 +481,7 @@ static int queue_frames(AVCodecContext *avctx, uint8_t *buf, int buf_size,
|
|||||||
break;
|
break;
|
||||||
case VPX_CODEC_STATS_PKT: {
|
case VPX_CODEC_STATS_PKT: {
|
||||||
struct vpx_fixed_buf *stats = &ctx->twopass_stats;
|
struct vpx_fixed_buf *stats = &ctx->twopass_stats;
|
||||||
stats->buf = av_realloc(stats->buf,
|
stats->buf = av_realloc_f(stats->buf, 1,
|
||||||
stats->sz + pkt->data.twopass_stats.sz);
|
stats->sz + pkt->data.twopass_stats.sz);
|
||||||
if (!stats->buf) {
|
if (!stats->buf) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Stat buffer realloc failed\n");
|
av_log(avctx, AV_LOG_ERROR, "Stat buffer realloc failed\n");
|
||||||
|
Reference in New Issue
Block a user