fix assertion failure

Originally committed as revision 9152 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2007-05-29 16:51:55 +00:00
parent 3dba31aa0d
commit 1e6b570087
2 changed files with 11 additions and 9 deletions

View file

@ -66,6 +66,13 @@ static inline void renorm_encoder(RangeCoder *c){
}
}
static inline int get_rac_count(RangeCoder *c){
int x= c->bytestream - c->bytestream_start + c->outstanding_count;
if(c->outstanding_byte >= 0)
x++;
return 8*x - av_log2(c->range);
}
static inline void put_rac(RangeCoder *c, uint8_t * const state, int bit){
int range1= (c->range * (*state)) >> 8;