Ignore:
Timestamp:
01/09/07 11:48:15 (18 years ago)
Author:
r2d
Message:

changed mpc_decoder_decode_frame so it should be compatible with programs using it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpcdec/trunk/src/mpc_decoder.c

    r160 r197  
    258258}
    259259
     260// Frame decoding. Takes big endian 32 bits words as input
    260261mpc_uint32_t
    261262mpc_decoder_decode_frame(mpc_decoder *d, mpc_uint32_t *in_buffer,
    262263                         mpc_uint32_t in_len, MPC_SAMPLE_FORMAT *out_buffer)
    263264{
     265  unsigned int i;
    264266  mpc_decoder_reset_bitstream_decode(d);
    265267  if (in_len > sizeof(d->Speicher)) in_len = sizeof(d->Speicher);
    266268  memcpy(d->Speicher, in_buffer, in_len);
     269  for (i = 0; i < (in_len + 3) / 4; i++)
     270    d->Speicher[i] = mpc_swap32(d->Speicher[i]);
    267271  d->dword = SWAP(d->Speicher[0]);
    268272  switch (d->StreamVersion) {
Note: See TracChangeset for help on using the changeset viewer.