diff options
author | Paul Gilbert | 2016-09-08 23:07:26 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-10 10:08:19 -0400 |
commit | 3a2ee8ea23247f72628294b48b43716c1b84d8a8 (patch) | |
tree | 27cd1dd05c3dcc313ed5a16cc94d8ded84e744dd /image/codecs/indeo/get_bits.cpp | |
parent | 400661182efae9659e664fec0e81c7ed8c3a10ec (diff) | |
download | scummvm-rg350-3a2ee8ea23247f72628294b48b43716c1b84d8a8.tar.gz scummvm-rg350-3a2ee8ea23247f72628294b48b43716c1b84d8a8.tar.bz2 scummvm-rg350-3a2ee8ea23247f72628294b48b43716c1b84d8a8.zip |
IMAGE: Fixes for setup of Indeo4 decoder
Diffstat (limited to 'image/codecs/indeo/get_bits.cpp')
-rw-r--r-- | image/codecs/indeo/get_bits.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/image/codecs/indeo/get_bits.cpp b/image/codecs/indeo/get_bits.cpp index fce773d8b4..f16532948b 100644 --- a/image/codecs/indeo/get_bits.cpp +++ b/image/codecs/indeo/get_bits.cpp @@ -161,35 +161,13 @@ GetBits::GetBits(const byte *buffer, size_t totalBits) { assert(buffer && totalBits < (INT_MAX - 7)); _buffer = buffer; - _disposeAfterUse = DisposeAfterUse::NO; _sizeInBits = totalBits; _sizeInBitsPlus8 = totalBits + 8; _index = 0; } -GetBits::GetBits(Common::SeekableReadStream &stream) { - byte *buffer = new byte[stream.size()]; - stream.read(buffer, stream.size()); - _buffer = buffer; - _disposeAfterUse = DisposeAfterUse::YES; - _sizeInBits = stream.size() * 8; - _sizeInBitsPlus8 = _sizeInBits + 8; - _index = 0; -} - GetBits::GetBits(const GetBits &src) : _index(src._index), _buffer(src._buffer), - _sizeInBits(src._sizeInBits), _sizeInBitsPlus8(src._sizeInBitsPlus8), - _disposeAfterUse(src._disposeAfterUse) { - if (_disposeAfterUse == DisposeAfterUse::YES) { - byte *buffer = new byte[src._sizeInBits / 8]; - Common::copy(src._buffer, src._buffer + (src._sizeInBits / 8), buffer); - _buffer = buffer; - } -} - -GetBits::~GetBits() { - if (_disposeAfterUse == DisposeAfterUse::YES) - delete[] _buffer; + _sizeInBits(src._sizeInBits), _sizeInBitsPlus8(src._sizeInBitsPlus8){ } int GetBits::getXbits(int n) { |