aboutsummaryrefslogtreecommitdiff
path: root/graphics/decoders
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/decoders')
-rw-r--r--graphics/decoders/pict.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/graphics/decoders/pict.cpp b/graphics/decoders/pict.cpp
index 957342084e..9963873b54 100644
--- a/graphics/decoders/pict.cpp
+++ b/graphics/decoders/pict.cpp
@@ -541,10 +541,14 @@ void PICTDecoder::decodeCompressedQuickTime(Common::SeekableReadStream &stream)
// Now we've reached the image descriptor, so read the relevant data from that
uint32 idStart = stream.pos();
uint32 idSize = stream.readUint32BE();
- stream.skip(40); // miscellaneous stuff
+ uint32 codec = stream.readUint32BE();
+ stream.skip(36); // miscellaneous stuff
uint32 jpegSize = stream.readUint32BE();
stream.skip(idSize - (stream.pos() - idStart)); // more useless stuff
+ if (codec != MKTAG('j', 'p', 'e', 'g'))
+ error("Unhandled CompressedQuickTime format '%s'", tag2str(codec));
+
Common::SeekableSubReadStream jpegStream(&stream, stream.pos(), stream.pos() + jpegSize);
JPEGDecoder jpeg;