[FFmpeg-devel] [PATCH] libvpxenc - use AV_BASE64_SIZE

James Zern jzern
Mon Jun 7 19:11:04 CEST 2010


Matches changes made to other files @r23462.
-------------- next part --------------
Index: libavcodec/libvpxenc.c
===================================================================
--- libavcodec/libvpxenc.c	(revision 23514)
+++ libavcodec/libvpxenc.c	(working copy)
@@ -460,7 +460,7 @@ static int vp8_encode(AVCodecContext *av
     coded_size = queue_frames(avctx, buf, buf_size, avctx->coded_frame);
 
     if (!frame && avctx->flags & CODEC_FLAG_PASS1) {
-        unsigned int b64_size = ((ctx->twopass_stats.sz + 2) / 3) * 4 + 1;
+        unsigned int b64_size = AV_BASE64_SIZE(ctx->twopass_stats.sz);
 
         avctx->stats_out = av_malloc(b64_size);
         if (!avctx->stats_out) {



More information about the ffmpeg-devel mailing list