Changeset 301 for libmpc/trunk/libmpcdec
- Timestamp:
- 04/27/07 22:37:57 (18 years ago)
- Location:
- libmpc/trunk/libmpcdec
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/trunk/libmpcdec/mpc_decoder.c
r296 r301 169 169 170 170 // reconstruct exact filelength 171 if (d->decoded_samples == d->samples&& d->stream_version == 7) {171 if (d->decoded_samples - d->samples < MPC_FRAME_LENGTH && d->stream_version == 7) { 172 172 int last_frame_samples = mpc_bits_read(r, 11); 173 if (last_frame_samples == 0) last_frame_samples = MPC_FRAME_LENGTH; 174 d->samples += last_frame_samples - MPC_FRAME_LENGTH; 175 samples_left += last_frame_samples - MPC_FRAME_LENGTH; 173 if (d->decoded_samples == d->samples) { 174 if (last_frame_samples == 0) last_frame_samples = MPC_FRAME_LENGTH; 175 d->samples += last_frame_samples - MPC_FRAME_LENGTH; 176 samples_left += last_frame_samples - MPC_FRAME_LENGTH; 177 } 176 178 } 177 179 -
libmpc/trunk/libmpcdec/mpc_demux.c
r291 r301 409 409 mpc_demux_fill(d, MAX_FRAME_SIZE, MPC_BUFFER_FULL | MPC_BUFFER_SWAP); 410 410 d->block_bits = (mpc_int_t) mpc_bits_read(&d->bits_reader, 20); // read frame size 411 if ( d->d->decoded_samples + MPC_FRAME_LENGTH == d->d->samples) d->block_bits += 11; // we will read last frame size411 if (MPC_FRAME_LENGTH > d->d->samples - d->d->decoded_samples - 1) d->block_bits += 11; // we will read last frame size 412 412 r = d->bits_reader; 413 413 mpc_decoder_decode_frame(d->d, &d->bits_reader, i);
Note: See TracChangeset
for help on using the changeset viewer.