From cf714205bdd069d9c6604d3cfc33102aaed3c4f8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 9 Mar 2015 21:17:45 +0100 Subject: [PATCH] avcodec/libvpxenc: Clear twopass_stats.sz on deallocation Signed-off-by: Michael Niedermayer --- libavcodec/libvpxenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 3def947f05..7f7d4aedaf 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -390,6 +390,7 @@ static av_cold int vpx_init(AVCodecContext *avctx, av_log(avctx, AV_LOG_ERROR, "Stat buffer alloc (%"SIZE_SPECIFIER" bytes) failed\n", ctx->twopass_stats.sz); + ctx->twopass_stats.sz = 0; return ret; } decode_size = av_base64_decode(ctx->twopass_stats.buf, avctx->stats_in,