comparison flac.c @ 2098:9a1f3f29bf99 libavcodec

skip_utf8, unused yet
author alex
date Sat, 26 Jun 2004 10:09:19 +0000
parents 3dabadc91d19
children 582e635cfa08
comparison
equal deleted inserted replaced
2097:dd81e5be0c7a 2098:9a1f3f29bf99
140 val|= tmp&0x3F; 140 val|= tmp&0x3F;
141 } 141 }
142 return val; 142 return val;
143 } 143 }
144 144
145 static int skip_utf8(GetBitContext *gb)
146 {
147 int ones=0, bytes;
148
149 while(get_bits1(gb))
150 ones++;
151
152 if (ones==0) bytes=0;
153 else if(ones==1) return -1;
154 else bytes= ones - 1;
155
156 skip_bits(gb, 7-ones);
157 while(bytes--){
158 const int tmp = get_bits(gb, 8);
159
160 if((tmp>>6) != 2)
161 return -1;
162 }
163 return 0;
164 }
165
145 static int get_crc8(const uint8_t *buf, int count){ 166 static int get_crc8(const uint8_t *buf, int count){
146 int crc=0; 167 int crc=0;
147 int i; 168 int i;
148 169
149 for(i=0; i<count; i++){ 170 for(i=0; i<count; i++){