aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2011-01-22 16:29:54 +0000
committerSven Hesse2011-01-22 16:29:54 +0000
commitcbbafc962d6a35d9b8744cd6d0094dfd976dc30f (patch)
tree96018a965a0edd60697c77befea101d6b9ee0adb /engines
parent755558de042d76751e4684fb8e56bd9463cfef89 (diff)
downloadscummvm-rg350-cbbafc962d6a35d9b8744cd6d0094dfd976dc30f.tar.gz
scummvm-rg350-cbbafc962d6a35d9b8744cd6d0094dfd976dc30f.tar.bz2
scummvm-rg350-cbbafc962d6a35d9b8744cd6d0094dfd976dc30f.zip
GOB: Extend the good-measure wait to all videos with sound
Fixes a glitch in Bambou, where the intro movie is cut off to soon. svn-id: r55432
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/inter_v6.cpp2
-rw-r--r--engines/gob/videoplayer.cpp5
-rw-r--r--engines/gob/videoplayer.h1
3 files changed, 6 insertions, 2 deletions
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp
index 77affee141..2acc4baf05 100644
--- a/engines/gob/inter_v6.cpp
+++ b/engines/gob/inter_v6.cpp
@@ -183,7 +183,7 @@ void Inter_v6::o6_playVmdOrMusic() {
_vm->_vidPlayer->play(slot, props);
if (close && !props.noBlock) {
- if ((props.flags & VideoPlayer::kFlagNoVideo) && (!props.canceled))
+ if (props.hasSound && !props.canceled)
_vm->_util->longDelay(500);
_vm->_vidPlayer->closeVideo(slot);
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 0413dff245..7233b7fe95 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -40,7 +40,8 @@ VideoPlayer::Properties::Properties() : type(kVideoTypeTry), sprite(Draw::kFront
x(-1), y(-1), width(-1), height(-1), flags(kFlagFrontSurface), switchColorMode(false),
startFrame(-1), lastFrame(-1), endFrame(-1), forceSeek(false),
breakKey(kShortKeyEscape), palCmd(8), palStart(0), palEnd(255), palFrame(-1),
- noBlock(false), loop(false), fade(false), waitEndFrame(true), canceled(false) {
+ noBlock(false), loop(false), fade(false), waitEndFrame(true),
+ hasSound(false), canceled(false) {
}
@@ -202,6 +203,8 @@ int VideoPlayer::openVideo(bool primary, const Common::String &file, Properties
if (primary)
_needBlit = (properties.flags & kFlagUseBackSurfaceContent) && (properties.sprite == Draw::kFrontSurface);
+ properties.hasSound = video->decoder->hasSound();
+
if (!video->decoder->hasSound())
video->decoder->setFrameRate(_vm->_util->getFrameRate());
diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h
index 5e12494c85..5df48fc6aa 100644
--- a/engines/gob/videoplayer.h
+++ b/engines/gob/videoplayer.h
@@ -96,6 +96,7 @@ public:
bool waitEndFrame; ///< Wait for the frame's time to run out?
+ bool hasSound; ///< Does the video have sound?
bool canceled; ///< Was the video canceled?
Properties();