NANCY: Skip unsupported video frame types for now

This commit is contained in:
Walter van Niftrik 2012-10-14 13:03:53 +02:00 committed by Eugene Sandulenko
parent d5ea0c840a
commit bd7e83cf8e
2 changed files with 8 additions and 1 deletions

View File

@ -97,7 +97,8 @@ AVFDecoder::AVFVideoTrack::AVFVideoTrack(Common::SeekableReadStream *stream) {
info.offset = stream->readUint32LE();
info.compressedSize = stream->readUint32LE();
info.size = stream->readUint32LE();
stream->skip(5); // Unknown
info.type = stream->readByte();
stream->skip(4); // Unknown;
_chunkInfo.push_back(info);
}
}
@ -114,6 +115,11 @@ const Graphics::Surface *AVFDecoder::AVFVideoTrack::decodeNextFrame() {
_fileStream->seek(_chunkInfo[_curFrame].offset);
uint size = _chunkInfo[_curFrame].size;
if (_chunkInfo[_curFrame].type != 0) {
warning("Skipping frame type %d", _chunkInfo[_curFrame].type);
return _surface;
}
if (_compressed) {
Common::ReadStream *input = _fileStream->readStream(_chunkInfo[_curFrame].compressedSize);
Common::MemoryWriteStream output((byte *)_surface->getPixels(), size);

View File

@ -67,6 +67,7 @@ private:
uint32 offset;
uint32 compressedSize;
uint32 size;
byte type;
};
bool decodeFrame(byte *rleData, int rleSize, byte *litData, int litSize, byte *dest, int left, int width, int height, int colorKey);