[Scummvm-git-logs] scummvm master -> 86afda75f58e503c27db012acd717b6aacd726e6
elasota
noreply at scummvm.org
Sat Sep 21 22:10:19 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
86afda75f5 MTROPOLIS: Handle videos that have no video frames
Commit: 86afda75f58e503c27db012acd717b6aacd726e6
https://github.com/scummvm/scummvm/commit/86afda75f58e503c27db012acd717b6aacd726e6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2024-09-21T18:10:16-04:00
Commit Message:
MTROPOLIS: Handle videos that have no video frames
In How To Build A Telemedicine Program, all the video files have no
video frames, and contain only audio. In this case, the QT player will
keep playing the video until the audio is finished. Handle such cases,
so that the game's UI is responsive
Changed paths:
engines/mtropolis/elements.cpp
diff --git a/engines/mtropolis/elements.cpp b/engines/mtropolis/elements.cpp
index 19d21a8de78..f87b654b35b 100644
--- a/engines/mtropolis/elements.cpp
+++ b/engines/mtropolis/elements.cpp
@@ -846,10 +846,11 @@ void MovieElement::playMedia(Runtime *runtime, Project *project) {
uint32 minTS = realRange.min;
uint32 maxTS = realRange.max;
uint32 targetTS = _currentTimestamp;
+ const bool hasFrames = _videoDecoder->getFrameCount() > 0;
int framesDecodedThisFrame = 0;
if (_currentPlayState == kMediaStatePlaying) {
- while (_videoDecoder->needsUpdate()) {
+ while (_videoDecoder->needsUpdate() && hasFrames) {
if (_playEveryFrame && framesDecodedThisFrame > 0)
break;
More information about the Scummvm-git-logs
mailing list