[Scummvm-cvs-logs] SF.net SVN: scummvm:[52603] scummvm/trunk/graphics/video/qt_decoder.cpp

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Mon Sep 6 20:15:51 CEST 2010


Revision: 52603
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52603&view=rev
Author:   mthreepwood
Date:     2010-09-06 18:15:51 +0000 (Mon, 06 Sep 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    scummvm/trunk/graphics/video/qt_decoder.cpp

Modified: scummvm/trunk/graphics/video/qt_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/qt_decoder.cpp	2010-09-06 18:13:39 UTC (rev 52602)
+++ scummvm/trunk/graphics/video/qt_decoder.cpp	2010-09-06 18:15:51 UTC (rev 52603)
@@ -811,6 +811,17 @@
 		_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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list