changeset 11825:c6db7667e39b libavcodec

Use AV_BASE64_SIZE() macro
author hyc
date Fri, 04 Jun 2010 01:15:41 +0000
parents 9f3522743348
children 11c5a87497d3
files libtheoraenc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);