Mercurial > libavcodec.hg
changeset 12326:e9efc7168faf libavcodec
10l: fix bit count for frame header
author | jbr |
---|---|
date | Sat, 31 Jul 2010 18:48:48 +0000 |
parents | 6da1651834cb |
children | dd8053936c33 |
files | flacenc.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flacenc.c Sat Jul 31 17:23:29 2010 +0000 +++ b/flacenc.c Sat Jul 31 18:48:48 2010 +0000 @@ -945,7 +945,10 @@ PUT_UTF8(s->frame_count, tmp, count += 8;) /* explicit block size */ - count += FFMAX(0, s->frame.bs_code[0] - 5) * 8; + if (s->frame.bs_code[0] == 6) + count += 8; + else if (s->frame.bs_code[0] == 7) + count += 16; /* explicit sample rate */ count += ((s->sr_code[0] == 12) + (s->sr_code[0] > 12)) * 8;