Changeset 107 for libmpcdec/branches/zorg/src/mpc_demux.c
- Timestamp:
- 11/09/06 13:44:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpcdec/branches/zorg/src/mpc_demux.c
r104 r107 172 172 void mpc_demux_decode(mpc_demux * d, mpc_frame_info * i) 173 173 { 174 i->samples = 0;175 if (d->d->OverallFrames != 0 && d->d->DecodedFrames == d->d->OverallFrames)176 return;177 174 if (d->si.stream_version == 8) { 178 175 mpc_bits_reader r; 179 if (d->block_bits < 8 ){176 if (d->block_bits < 8 && (d->d->decoded_frames < d->d->frames || d->d->frames == 0)){ 180 177 mpc_block b; 181 178 d->bits_reader.count &= -8; … … 195 192 d->block_bits -= (d->bits_reader.buff - r.buff) * 8 + r.count - d->bits_reader.count; 196 193 } else { 197 int frame_size;198 194 mpc_bits_reader r; 199 195 mpc_demux_fill(d, MAX_FRAME_SIZE, MPC_BUFFER_FULL | MPC_BUFFER_SWAP); 200 frame_size =mpc_bits_read(&d->bits_reader, 20); // read frame size196 mpc_bits_read(&d->bits_reader, 20); // read frame size 201 197 r = d->bits_reader; 202 198 mpc_decoder_decode_frame(d->d, &d->bits_reader, i); 203 if ((d->bits_reader.buff - r.buff) * 8 + r.count - d->bits_reader.count != frame_size){204 frame_size--;205 frame_size += 1;206 }207 199 } 208 200 } … … 215 207 // mpc_uint32_t FrameBitCnt = 0; 216 208 // 217 // if (d-> DecodedFrames >= d->OverallFrames) {209 // if (d->decoded_frames >= d->OverallFrames) { 218 210 // return (mpc_uint32_t)(-1); // end of file -> abort decoding 219 211 // } 220 212 // 221 213 // // add seeking info 222 // if (d->seeking_table_frames < d-> DecodedFrames &&223 // (d-> DecodedFrames & ((1 << d->seeking_pwr) - 1)) == 0) {224 // d->seeking_table[d-> DecodedFrames >> d->seeking_pwr] = mpc_decoder_bits_read(d);225 // d->seeking_table_frames = d-> DecodedFrames;214 // if (d->seeking_table_frames < d->decoded_frames && 215 // (d->decoded_frames & ((1 << d->seeking_pwr) - 1)) == 0) { 216 // d->seeking_table[d->decoded_frames >> d->seeking_pwr] = mpc_decoder_bits_read(d); 217 // d->seeking_table_frames = d->decoded_frames; 226 218 // } 227 219 //
Note: See TracChangeset
for help on using the changeset viewer.