|
|
@@ -101,7 +101,7 @@ static int get_stats(AVCodecContext *avctx, int eos) |
|
|
memcpy(h->stats + h->stats_offset, buf, bytes); |
|
|
memcpy(h->stats + h->stats_offset, buf, bytes); |
|
|
h->stats_offset += bytes; |
|
|
h->stats_offset += bytes; |
|
|
} else { |
|
|
} 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 |
|
|
// libtheora generates a summary header at the end |
|
|
memcpy(h->stats, buf, bytes); |
|
|
memcpy(h->stats, buf, bytes); |
|
|
avctx->stats_out = av_malloc(b64_size); |
|
|
avctx->stats_out = av_malloc(b64_size); |
|
|
|