aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse2011-01-19 00:16:13 +0000
committerSven Hesse2011-01-19 00:16:13 +0000
commit22c3e7b1de17403e246e2a0f8a1e238de0cc9310 (patch)
tree84e29eb53b7d7d1c992e94f8114915d3c9c8e01a
parent6a586881af7764918e2bb4da039ce9c0b03fc2ed (diff)
downloadscummvm-rg350-22c3e7b1de17403e246e2a0f8a1e238de0cc9310.tar.gz
scummvm-rg350-22c3e7b1de17403e246e2a0f8a1e238de0cc9310.tar.bz2
scummvm-rg350-22c3e7b1de17403e246e2a0f8a1e238de0cc9310.zip
VIDEO: Don't assert() when a needed codec isn't compiled in
svn-id: r55317
-rw-r--r--graphics/video/coktel_decoder.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp
index bd09127c14..3ee4bdcdda 100644
--- a/graphics/video/coktel_decoder.cpp
+++ b/graphics/video/coktel_decoder.cpp
@@ -2622,8 +2622,14 @@ byte *VMDDecoder::deADPCM(const byte *data, uint32 &size, int32 init, int32 inde
}
PixelFormat VMDDecoder::getPixelFormat() const {
- if (_externalCodec && _codec)
- return _codec->getPixelFormat();
+ if (_externalCodec) {
+ if (_codec)
+ return _codec->getPixelFormat();
+
+ // If we don't have the needed codec, just assume it's in the
+ // current screen format
+ return g_system->getScreenFormat();
+ }
if (_blitMode > 0)
return g_system->getScreenFormat();