aboutsummaryrefslogtreecommitdiff
path: root/audio/decoders/qdm2.cpp
diff options
context:
space:
mode:
authorD G Turner2012-04-10 09:31:55 +0100
committerD G Turner2012-04-13 07:37:28 +0100
commit50a9c6429d81b002c10d0ac05cabbc492716f180 (patch)
treeab24e1ea10fd1d0fabf28d4b8e407e901219c5d2 /audio/decoders/qdm2.cpp
parentb5f5cbe5fa124dfd137099d2782fb902686fede7 (diff)
downloadscummvm-rg350-50a9c6429d81b002c10d0ac05cabbc492716f180.tar.gz
scummvm-rg350-50a9c6429d81b002c10d0ac05cabbc492716f180.tar.bz2
scummvm-rg350-50a9c6429d81b002c10d0ac05cabbc492716f180.zip
AUDIO: Update to QDM2 codec fixing pointer to stream buffer usage.
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...
Diffstat (limited to 'audio/decoders/qdm2.cpp')
-rw-r--r--audio/decoders/qdm2.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/audio/decoders/qdm2.cpp b/audio/decoders/qdm2.cpp
index ab71f1ca85..0d4e0d1c50 100644
--- a/audio/decoders/qdm2.cpp
+++ b/audio/decoders/qdm2.cpp
@@ -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) {
@@ -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;