changeset 10173:f55ca9a2b948 libavcodec

Fix max_coded_frame_size computation to account for byte alignment. Fixes issue 1386.
author jai_menon
date Tue, 15 Sep 2009 15:06:04 +0000
parents eda985c53dba
children 89cd870ca180
files alacenc.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/alacenc.c	Mon Sep 14 21:37:41 2009 +0000
+++ b/alacenc.c	Tue Sep 15 15:06:04 2009 +0000
@@ -385,8 +385,7 @@
     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