Skip to content

Commit

Permalink
AUDIO: Update to QDM2 codec fixing pointer to stream buffer usage.
Browse files Browse the repository at this point in the history
This should allow the QDM2 codec to work again with Common::Bitstream
instead of the older getBits() reader, but this aborts with a reading
past end of stream error...
  • Loading branch information
digitall committed Apr 13, 2012
1 parent b5f5cbe commit 50a9c64
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions audio/decoders/qdm2.cpp
Expand Up @@ -2576,8 +2576,7 @@ void QDM2Stream::qdm2_decode_super_block(void) {
if (header.type == 0x7f)
header.type |= (gb->getBits(8) << 8);

// FIXME: Replace internal bitstream buffer usage
//header.data = &gb->buffer[gb->size() / 8];
header.data = &_compressedData[gb->pos() / 8];
}

if (header.type < 2 || header.type >= 8) {
Expand Down Expand Up @@ -2652,8 +2651,7 @@ void QDM2Stream::qdm2_decode_super_block(void) {
if (packet->type == 0x7f)
packet->type |= (gb->getBits(8) << 8);

// FIXME: Replace internal bitstream buffer usage
//packet->data = &gb->buffer[gb->size() / 8];
packet->data = &header.data[gb->pos() / 8];
}

next_index = packet->size + gb->pos() / 8;
Expand Down

0 comments on commit 50a9c64

Please sign in to comment.