aboutsummaryrefslogtreecommitdiff
path: root/graphics/video
diff options
context:
space:
mode:
authorFilippos Karapetis2009-06-07 22:34:03 +0000
committerFilippos Karapetis2009-06-07 22:34:03 +0000
commitec38b77b004c8affefb6b1218833b56ad166d653 (patch)
tree1132fd671ca3a7c790534836dfd953387db1d2bb /graphics/video
parenteb4f887ec342e504a3ff8fbc86560b7a652ea3c6 (diff)
downloadscummvm-rg350-ec38b77b004c8affefb6b1218833b56ad166d653.tar.gz
scummvm-rg350-ec38b77b004c8affefb6b1218833b56ad166d653.tar.bz2
scummvm-rg350-ec38b77b004c8affefb6b1218833b56ad166d653.zip
Changed the bitstream buffer used to initialize the big Huffman trees to be a normal byte array, instead of a Common::Array
svn-id: r41356
Diffstat (limited to 'graphics/video')
-rw-r--r--graphics/video/smk_decoder.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/graphics/video/smk_decoder.cpp b/graphics/video/smk_decoder.cpp
index 9fa0b948f1..9db8f0c730 100644
--- a/graphics/video/smk_decoder.cpp
+++ b/graphics/video/smk_decoder.cpp
@@ -30,7 +30,6 @@
#include "graphics/video/smk_decoder.h"
#include "common/archive.h"
-#include "common/array.h"
#include "common/endian.h"
#include "common/util.h"
#include "common/stream.h"
@@ -488,17 +487,18 @@ bool SmackerDecoder::loadFile(const char *fileName) {
for (i = 0; i < _videoInfo.frameCount; ++i)
_frameTypes[i] = _fileStream->readByte();
- Common::Array<byte> huffmanTrees;
- huffmanTrees.resize(_header.treesSize);
- _fileStream->read(&huffmanTrees[0], _header.treesSize);
+ byte *huffmanTrees = new byte[_header.treesSize];
+ _fileStream->read(huffmanTrees, _header.treesSize);
- BitStream bs(&huffmanTrees[0], _header.treesSize);
+ BitStream bs(huffmanTrees, _header.treesSize);
_MMapTree = new BigHuffmanTree(bs, _header.mMapSize);
_MClrTree = new BigHuffmanTree(bs, _header.mClrSize);
_FullTree = new BigHuffmanTree(bs, _header.fullSize);
_TypeTree = new BigHuffmanTree(bs, _header.typeSize);
+ delete[] huffmanTrees;
+
_videoFrameBuffer = (byte *)malloc(2 * _videoInfo.width * _videoInfo.height);
memset(_videoFrameBuffer, 0, 2 * _videoInfo.width * _videoInfo.height);
_palette = (byte *)malloc(3 * 256);