From cbbafc962d6a35d9b8744cd6d0094dfd976dc30f Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 22 Jan 2011 16:29:54 +0000 Subject: 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 --- engines/gob/inter_v6.cpp | 2 +- engines/gob/videoplayer.cpp | 5 ++++- engines/gob/videoplayer.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'engines') 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(); -- cgit v1.2.3