Mercurial > libavcodec.hg
comparison alacenc.c @ 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 | 0dce4fe6e6f3 |
children | 2b8a327189cd |
comparison
equal
deleted
inserted
replaced
10172:eda985c53dba | 10173:f55ca9a2b948 |
---|---|
383 s->rc.history_mult = 40; | 383 s->rc.history_mult = 40; |
384 s->rc.initial_history = 10; | 384 s->rc.initial_history = 10; |
385 s->rc.k_modifier = 14; | 385 s->rc.k_modifier = 14; |
386 s->rc.rice_modifier = 4; | 386 s->rc.rice_modifier = 4; |
387 | 387 |
388 s->max_coded_frame_size = (ALAC_FRAME_HEADER_SIZE + ALAC_FRAME_FOOTER_SIZE + | 388 s->max_coded_frame_size = 8 + (avctx->frame_size*avctx->channels*avctx->bits_per_coded_sample>>3); |
389 avctx->frame_size*avctx->channels*avctx->bits_per_coded_sample)>>3; | |
390 | 389 |
391 s->write_sample_size = avctx->bits_per_coded_sample + avctx->channels - 1; // FIXME: consider wasted_bytes | 390 s->write_sample_size = avctx->bits_per_coded_sample + avctx->channels - 1; // FIXME: consider wasted_bytes |
392 | 391 |
393 AV_WB32(alac_extradata, ALAC_EXTRADATA_SIZE); | 392 AV_WB32(alac_extradata, ALAC_EXTRADATA_SIZE); |
394 AV_WB32(alac_extradata+4, MKBETAG('a','l','a','c')); | 393 AV_WB32(alac_extradata+4, MKBETAG('a','l','a','c')); |