avcodec/libvpxenc: Clear twopass_stats.sz on deallocation
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 9 Mar 2015 20:17:45 +0000 (21:17 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 9 Mar 2015 20:18:43 +0000 (21:18 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/libvpxenc.c

index 3def947..7f7d4ae 100644 (file)
@@ -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,