53 int bs_code, sr_code, bps_code;
56 if ((
get_bits(gb, 15) & 0x7FFF) != 0x7FFC) {
78 "invalid channel mode: %d\n", fi->
ch_mode);
84 if (bps_code == 3 || bps_code == 7) {
86 "invalid sample size code (%d)\n",
95 "broken stream, invalid padding\n");
103 "sample/frame number invalid; utf8 fscked\n");
110 "reserved blocksize code: 0\n");
112 }
else if (bs_code == 6) {
114 }
else if (bs_code == 7) {
123 }
else if (sr_code == 12) {
124 fi->samplerate =
get_bits(gb, 8) * 1000;
125 }
else if (sr_code == 13) {
127 }
else if (sr_code == 14) {
128 fi->samplerate =
get_bits(gb, 16) * 10;
131 "illegal sample rate code %d\n",
141 "header crc mismatch\n");
157 count += ch * ((7+bps+7)/8);
160 count += (( 2*bps+1) * blocksize + 7) / 8;
162 count += ( ch*bps * blocksize + 7) / 8;
191 *streaminfo_start = &avctx->
extradata[8];
211 s->max_blocksize =
get_bits(&gb, 16);
215 s->max_blocksize = 16;