Changeset 312 for libmpc/trunk/libmpcenc


Ignore:
Timestamp:
05/09/07 18:24:35 (18 years ago)
Author:
r2d
Message:

Bug correction, please re-test encoding through pipe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/libmpcenc/bitstream.c

    r307 r312  
    190190
    191191        // write block header (key / length)
    192         len = e->pos + 2 + (addCRC > 0) * 4;
     192        len = e->pos + (addCRC > 0) * 4;
    193193        if (min_size <= len)
    194194                min_size = len;
     
    197197                for(i = 0; i < pad; i++)
    198198                        writeBits(e, 0, 8);
    199         }
    200         len = encodeSize(min_size, blockSize, MPC_TRUE);
     199                emptyBits(e);
     200        }
     201        len = encodeSize(min_size + 2, blockSize, MPC_TRUE);
    201202        fwrite(key, sizeof(char), 2, fp);
    202203        fwrite(blockSize, sizeof(char), len, fp);
Note: See TracChangeset for help on using the changeset viewer.