[FFmpeg-cvslog] r19859 - trunk/libavcodec/alacenc.c

jai_menon subversion
Tue Sep 15 17:06:04 CEST 2009


Author: jai_menon
Date: Tue Sep 15 17:06:04 2009
New Revision: 19859

Log:
Fix max_coded_frame_size computation to account for byte alignment.

Fixes issue 1386.

Modified:
   trunk/libavcodec/alacenc.c

Modified: trunk/libavcodec/alacenc.c
==============================================================================
--- trunk/libavcodec/alacenc.c	Tue Sep 15 16:56:09 2009	(r19858)
+++ trunk/libavcodec/alacenc.c	Tue Sep 15 17:06:04 2009	(r19859)
@@ -385,8 +385,7 @@ static av_cold int alac_encode_init(AVCo
     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
 



More information about the ffmpeg-cvslog mailing list