Changeset 177


Ignore:
Timestamp:
12/20/06 14:41:55 (18 years ago)
Author:
r2d
Message:
  • corrected decoded length (tested on sv8, not tested on sv7)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/branches/r2d/libmpcdec/mpc_decoder.c

    r161 r177  
    152152        mpc_int64_t samples_left;
    153153
    154         if (d->decoded_samples >= d->samples && d->samples != 0) {
     154        samples_left = d->samples - d->decoded_samples + MPC_DECODER_SYNTH_DELAY;
     155
     156        if (samples_left <= 0 && d->samples != 0) {
    155157                i->samples = 0;
    156158                i->bits = -1;
     
    177179        }
    178180
    179         samples_left = d->samples - d->decoded_samples + MPC_DECODER_SYNTH_DELAY;
    180181        i->samples = samples_left > MPC_FRAME_LENGTH ? MPC_FRAME_LENGTH : samples_left < 0 ? 0 : (mpc_uint32_t) samples_left;
    181182        i->bits = (mpc_uint32_t) (((r->buff - r_sav.buff) << 3) + r_sav.count - r->count);
Note: See TracChangeset for help on using the changeset viewer.