diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/bink_decoder.cpp | 4 | ||||
-rw-r--r-- | video/bink_decoder.h | 2 | ||||
-rw-r--r-- | video/qt_decoder.cpp | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp index c02042f972..a08c93522b 100644 --- a/video/bink_decoder.cpp +++ b/video/bink_decoder.cpp @@ -703,13 +703,13 @@ void BinkDecoder::initBundles() { _bundles[kSourceBlockTypes ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1; _bundles[kSourceSubBlockTypes].countLengths[i] = Common::intLog2((width >> 4) + 511) + 1; - _bundles[kSourceColors ].countLengths[i] = Common::intLog2((width >> 3)*64 + 511) + 1; + _bundles[kSourceColors ].countLengths[i] = Common::intLog2((cbw[i] )*64 + 511) + 1; _bundles[kSourceIntraDC ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1; _bundles[kSourceInterDC ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1; _bundles[kSourceXOff ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1; _bundles[kSourceYOff ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1; _bundles[kSourcePattern ].countLengths[i] = Common::intLog2((cbw[i] << 3) + 511) + 1; - _bundles[kSourceRun ].countLengths[i] = Common::intLog2((width >> 3)*48 + 511) + 1; + _bundles[kSourceRun ].countLengths[i] = Common::intLog2((cbw[i] )*48 + 511) + 1; } } diff --git a/video/bink_decoder.h b/video/bink_decoder.h index ceb55391a9..dd1b7ca67d 100644 --- a/video/bink_decoder.h +++ b/video/bink_decoder.h @@ -36,6 +36,8 @@ #include "common/array.h" #include "common/rational.h" +#include "graphics/surface.h" + #include "video/video_decoder.h" namespace Common { diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 389acea86b..74bf533e62 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -486,7 +486,7 @@ Common::SeekableReadStream *QuickTimeDecoder::getNextFramePacket(uint32 &descId) uint32 sampleToChunkIndex = 0; for (uint32 i = 0; i < _tracks[_videoTrackIndex]->chunkCount; i++) { - if (i >= _tracks[_videoTrackIndex]->sampleToChunk[sampleToChunkIndex].first) + if (sampleToChunkIndex < _tracks[_videoTrackIndex]->sampleToChunkCount && i >= _tracks[_videoTrackIndex]->sampleToChunk[sampleToChunkIndex].first) sampleToChunkIndex++; totalSampleCount += _tracks[_videoTrackIndex]->sampleToChunk[sampleToChunkIndex - 1].count; |