# HG changeset patch # User hyc # Date 1275614141 0 # Node ID c6db7667e39b6e016e82ef12bd6f1659db6168cc # Parent 9f3522743348707c5d4c3718a4caa61aedf9291b Use AV_BASE64_SIZE() macro diff -r 9f3522743348 -r c6db7667e39b libtheoraenc.c --- a/libtheoraenc.c Thu Jun 03 23:53:10 2010 +0000 +++ b/libtheoraenc.c Fri Jun 04 01:15:41 2010 +0000 @@ -101,7 +101,7 @@ memcpy(h->stats + h->stats_offset, buf, bytes); h->stats_offset += bytes; } else { - int b64_size = ((h->stats_offset + 2) / 3) * 4 + 1; + int b64_size = AV_BASE64_SIZE(h->stats_offset); // libtheora generates a summary header at the end memcpy(h->stats, buf, bytes); avctx->stats_out = av_malloc(b64_size);