diff options
author | Matthew Hoops | 2010-09-06 18:15:51 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-09-06 18:15:51 +0000 |
commit | c78a63460be88bce41125f8555bf1d5ffdfa9ad0 (patch) | |
tree | 10e160dd22fbc3d748565aa53cce630a2357f82a /graphics/video | |
parent | 6c980b3593d6f428aac618888224a0be4d279fef (diff) | |
download | scummvm-rg350-c78a63460be88bce41125f8555bf1d5ffdfa9ad0.tar.gz scummvm-rg350-c78a63460be88bce41125f8555bf1d5ffdfa9ad0.tar.bz2 scummvm-rg350-c78a63460be88bce41125f8555bf1d5ffdfa9ad0.zip |
VIDEO: Skip multiple tags in a QuickTime stsd entry
Fixes crashes when playing two videos in Riven DVD (card 262). Note that the videos still don't display properly because of a bug in QTRLE 16bpp. For the record, FFmpeg doesn't handle this properly either.
svn-id: r52603
Diffstat (limited to 'graphics/video')
-rw-r--r-- | graphics/video/qt_decoder.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/video/qt_decoder.cpp b/graphics/video/qt_decoder.cpp index 3cdb82fb10..8437f0af43 100644 --- a/graphics/video/qt_decoder.cpp +++ b/graphics/video/qt_decoder.cpp @@ -811,6 +811,17 @@ int QuickTimeDecoder::readSTSD(MOVatom atom) { _fd->readUint16BE(); // index debug(0, "size=%d 4CC= %s codec_type=%d", size, tag2str(format), st->codec_type); + + if (st->codec_tag && st->codec_tag != format) { + // HACK: Multiple FourCC, skip this. FFmpeg does this too and also + // skips it with a TODO. However, we really don't need to support + // multiple codec tags since the only two videos in Riven DVD that + // do this just have a fake second stream (or so it seems). + debug(3, "Multiple FourCC not supported"); + _fd->seek(start_pos + size); + continue; + } + st->codec_tag = format; if (st->codec_type == CODEC_TYPE_VIDEO) { |