Commit 4cb4e3f4 authored by jai_menon's avatar jai_menon

Fix max_coded_frame_size computation to account for byte alignment.

Fixes issue 1386.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19859 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 10b37718
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment