summaryrefslogtreecommitdiff
path: root/libavcodec/alacenc.c
diff options
context:
space:
mode:
authorJai Menon <jmenon86@gmail.com>2009-09-15 15:06:04 +0000
committerJai Menon <jmenon86@gmail.com>2009-09-15 15:06:04 +0000
commit23703388505bdabb4149d67bc476efe1c0c4b7a7 (patch)
treeefb6cfef98e723eb77cf09e3c0fe4fc8525cff3f /libavcodec/alacenc.c
parent37e34df5a5cb3c493123ea18dc3141f9eef13458 (diff)
Fix max_coded_frame_size computation to account for byte alignment.
Fixes issue 1386. Originally committed as revision 19859 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/alacenc.c')
-rw-r--r--libavcodec/alacenc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index f8a18b9556..5e8defbe8b 100644
--- a/libavcodec/alacenc.c
+++ b/libavcodec/alacenc.c
@@ -385,8 +385,7 @@ static av_cold int alac_encode_init(AVCodecContext *avctx)
s->rc.k_modifier = 14;
s->rc.rice_modifier = 4;
- s->max_coded_frame_size = (ALAC_FRAME_HEADER_SIZE + ALAC_FRAME_FOOTER_SIZE +
- avctx->frame_size*avctx->channels*avctx->bits_per_coded_sample)>>3;
+ s->max_coded_frame_size = 8 + (avctx->frame_size*avctx->channels*avctx->bits_per_coded_sample>>3);
s->write_sample_size = avctx->bits_per_coded_sample + avctx->channels - 1; // FIXME: consider wasted_bytes