Ignore:
Timestamp:
11/13/06 20:13:18 (15 years ago)
Author:
r2d
Message:
  • changed decoder struct and length computations
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpcdec/branches/zorg/src/mpc_demux.c

    r117 r126  
    119119
    120120        if (memcmp(magic, "MP+", 3) == 0) {
    121                 d->si.stream_version = magic[3];
    122                 if ((d->si.stream_version & 15) == 7) {
     121                d->si.stream_version = magic[3] & 15;
     122                d->si.pns = magic[3] >> 4;
     123                if (d->si.stream_version == 7) {
    123124                        mpc_demux_fill(d, 6 * 4, MPC_BUFFER_SWAP); // header block size + endian convertion
    124125                        streaminfo_read_header_sv7(&d->si, &d->bits_reader);
     
    183184        if (d->si.stream_version == 8) {
    184185                mpc_bits_reader r;
    185                 if (d->block_bits < 8 && (d->d->decoded_frames < d->d->frames || d->d->frames == 0)){
     186                if (d->block_bits < 8 && (d->d->decoded_samples < d->d->samples || d->d->samples == 0)){
    186187                        mpc_block b;
    187188                        d->bits_reader.count &= -8;
     
    199200                r = d->bits_reader;
    200201                mpc_decoder_decode_frame(d->d, &d->bits_reader, i);
    201                 d->block_bits -= (d->bits_reader.buff - r.buff) * 8 + r.count - d->bits_reader.count;
     202                d->block_bits -= ((d->bits_reader.buff - r.buff) << 3) + r.count - d->bits_reader.count;
    202203        } else {
    203204                mpc_bits_reader r;
Note: See TracChangeset for help on using the changeset viewer.