aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2010-07-31 18:48:48 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2010-07-31 18:48:48 +0000
commitd309f0195040db62f462e8bd68203fd38b274158 (patch)
tree7fc7a2ae365c938ea9f2ffce7d181e5cd73e4764
parentb22f9d6535c10ccb453c3a3fad118bc34675dfb1 (diff)
downloadffmpeg-d309f0195040db62f462e8bd68203fd38b274158.tar.gz
10l: fix bit count for frame header
Originally committed as revision 24627 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/flacenc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index d9f9251c9e..7d1e773781 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -945,7 +945,10 @@ static int count_frame_header(FlacEncodeContext *s)
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;