[Scummvm-git-logs] scummvm master -> 4b6ee4b08f41f796ed5601ecf132fa41a5b62483
sev-
noreply at scummvm.org
Sat Dec 28 15:50:20 UTC 2024
This automated email contains information about 9 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1f81fea5ba GROOVIE: Initial code for processing VOB files for tlc-dvd
eb63b7120f GROOVIE: Make tlc-dvd runnable
d7ff1d460d GROOVIE: Improve cursor-related debug output
22b5715c15 GROOVIE: Gracefully process bad cursor format
9628c6db52 GROOVIE: Safer tlc-dvd resource processing
fdec10cca8 GROOVIE: Avoid double free on MPEG videos
781bc8dc7a GROOVIE: Hook in tlc-dvd MPEG audio
08ede3f5ba GROOVIE: Gracefully process end of DVD video
4b6ee4b08f GROVIE: Sync video playback with audio
Commit: 1f81fea5bae6a0b5350ad6a6469d363748ee04e8
https://github.com/scummvm/scummvm/commit/1f81fea5bae6a0b5350ad6a6469d363748ee04e8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-12-28T16:49:54+01:00
Commit Message:
GROOVIE: Initial code for processing VOB files for tlc-dvd
Based on work of Die4Ever
Changed paths:
engines/groovie/configure.engine
engines/groovie/resource.cpp
engines/groovie/video/player.h
engines/groovie/video/roq.cpp
engines/groovie/video/roq.h
diff --git a/engines/groovie/configure.engine b/engines/groovie/configure.engine
index 267d6df5914..cb332eb3177 100644
--- a/engines/groovie/configure.engine
+++ b/engines/groovie/configure.engine
@@ -1,4 +1,4 @@
# This file is included from the main "configure" script
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] [components]
add_engine groovie "Groovie" yes "groovie2" "7th Guest" "highres"
-add_engine groovie2 "Groovie 2 games" yes "" "" "jpeg 16bit" "midi"
+add_engine groovie2 "Groovie 2 games" yes "" "" "jpeg 16bit" "midi mpeg2"
diff --git a/engines/groovie/resource.cpp b/engines/groovie/resource.cpp
index 11723582b16..8a9366a84c1 100644
--- a/engines/groovie/resource.cpp
+++ b/engines/groovie/resource.cpp
@@ -46,6 +46,17 @@ Common::SeekableReadStream *ResMan::open(uint32 fileRef) {
}
Common::SeekableReadStream *ResMan::open(const ResInfo &resInfo) {
+ // Is this a raw vob file? (TLC DVD)
+ if (resInfo.gjd >= 1000) {
+ Common::Path filename = Common::Path(Common::String::format("VOB%u.VOB", resInfo.offset));
+ if (!Common::File::exists(filename)) {
+ return nullptr;
+ }
+ Common::File *vobFile = new Common::File();
+ vobFile->open(filename);
+ return new Common::SeekableSubReadStream(vobFile, 0, vobFile->size(), DisposeAfterUse::YES);
+ }
+
// Do we know the name of the required GJD?
if (resInfo.gjd >= _gjds.size()) {
error("Groovie::Resource: Unknown GJD %d", resInfo.gjd);
@@ -288,7 +299,7 @@ uint32 ResMan_v2::getRef(Common::String name) {
// Test whether it's the resource we're searching
Common::String resname(readname, 18);
- if (resname.hasPrefix(name.c_str())) {
+ if (resname.hasPrefixIgnoreCase(name.c_str())) {
debugC(2, kDebugResource, "Groovie::Resource: Resource %18s matches %s", readname, name.c_str());
found = true;
break;
diff --git a/engines/groovie/video/player.h b/engines/groovie/video/player.h
index 62d36767d3b..4d86e834aaa 100644
--- a/engines/groovie/video/player.h
+++ b/engines/groovie/video/player.h
@@ -79,7 +79,7 @@ private:
Video::Subtitles _subtitles;
protected:
- void waitFrame();
+ virtual void waitFrame();
};
} // End of Groovie namespace
diff --git a/engines/groovie/video/roq.cpp b/engines/groovie/video/roq.cpp
index 5baa64dc632..0dd36b3698a 100644
--- a/engines/groovie/video/roq.cpp
+++ b/engines/groovie/video/roq.cpp
@@ -41,6 +41,10 @@
#include "audio/mixer.h"
#include "audio/decoders/raw.h"
+#ifdef USE_MPEG2
+#include "video/mpegps_decoder.h"
+#endif
+
#include "common/file.h"
#ifdef USE_PNG
#include "image/png.h"
@@ -108,7 +112,17 @@ ROQPlayer::ROQPlayer(GroovieEngine *vm) :
_currBuf = new Graphics::Surface();
_prevBuf = new Graphics::Surface();
_overBuf = new Graphics::Surface(); // Overlay buffer. Objects move behind this layer
+
+ // Allocate new buffers
+ _currBuf->create(_bg->w, _bg->h, _vm->_pixelFormat);
+ _prevBuf->create(_bg->w, _bg->h, _vm->_pixelFormat);
+ _overBuf->create(_bg->w, _bg->h, _vm->_pixelFormat);
+ _scaleX = MIN(_syst->getWidth() / _bg->w, 2);
+ _scaleY = MIN(_syst->getHeight() / _bg->h, 2);
+
_restoreArea = new Common::Rect();
+
+ _videoDecoder = nullptr;
}
ROQPlayer::~ROQPlayer() {
@@ -179,6 +193,16 @@ uint16 ROQPlayer::loadInternal() {
debugC(6, kDebugVideo, "Groovie::ROQ: First Block param = 0x%04X", blockHeader.param);
// Verify the file signature
+#ifdef USE_MPEG2
+ if (blockHeader.type == 0) {
+ _videoDecoder = new Video::MPEGPSDecoder();
+ _videoDecoder->loadStream(_file);
+ return 24;
+ }
+ delete _videoDecoder;
+ _videoDecoder = nullptr;
+#endif
+
if (blockHeader.type != 0x1084) {
return 0;
}
@@ -215,6 +239,16 @@ uint16 ROQPlayer::loadInternal() {
}
}
+void ROQPlayer::waitFrame() {
+#ifdef USE_MPEG2
+ if (_videoDecoder) {
+ uint32 wait = _videoDecoder->getTimeToNextFrame();
+ _syst->delayMillis(wait);
+ } else
+#endif
+ VideoPlayer::waitFrame();
+}
+
void ROQPlayer::clearOverlay() {
debugC(1, kDebugVideo, "Groovie::ROQ: Clear overlay buffer");
if (gDebugLevel >= 8 && DebugMan.isDebugChannelEnabled(kDebugVideo)) {
@@ -430,6 +464,18 @@ void ROQPlayer::buildShowBuf() {
bool ROQPlayer::playFrameInternal() {
debugC(5, kDebugVideo, "Groovie::ROQ: Playing frame");
+#ifdef USE_MPEG2
+ if (_videoDecoder) {
+ const Graphics::Surface *srcSurf = _videoDecoder->decodeNextFrame();
+ _currBuf->free();
+ delete _currBuf;
+ _currBuf = new Graphics::Surface();
+ _currBuf->copyFrom(*srcSurf);
+ buildShowBuf();
+ return _videoDecoder->endOfVideo();
+ }
+#endif
+
// Process the needed blocks until the next video frame
bool endframe = false;
while (!endframe && !_file->eos()) {
diff --git a/engines/groovie/video/roq.h b/engines/groovie/video/roq.h
index 655b46fe73f..43a1038274d 100644
--- a/engines/groovie/video/roq.h
+++ b/engines/groovie/video/roq.h
@@ -25,6 +25,10 @@
#include "groovie/video/player.h"
#include "audio/mixer.h"
+namespace Video {
+class VideoDecoder;
+}
+
namespace Groovie {
class GroovieEngine;
@@ -49,6 +53,7 @@ public:
void copyfgtobg(uint8 arg) override;
protected:
+ void waitFrame() override;
uint16 loadInternal() override;
bool playFrameInternal() override;
void stopAudioStream() override;
@@ -113,6 +118,8 @@ private:
byte _alpha;
bool _firstFrame;
Common::Rect *_restoreArea; // Area to be repainted by foreground
+
+ Video::VideoDecoder *_videoDecoder;
};
class ROQSoundPlayer : public ROQPlayer {
Commit: eb63b7120fa66cc7b22bf7eb8216bbe825e9df06
https://github.com/scummvm/scummvm/commit/eb63b7120fa66cc7b22bf7eb8216bbe825e9df06
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-12-28T16:49:57+01:00
Commit Message:
GROOVIE: Make tlc-dvd runnable
Changed paths:
engines/groovie/detection.cpp
diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp
index be4ae13d2bf..d99db4e492e 100644
--- a/engines/groovie/detection.cpp
+++ b/engines/groovie/detection.cpp
@@ -97,7 +97,7 @@ const int BASE_FLAGS = ADGF_NO_FLAGS;
GROOVIEGAME("tlc", extra, f1, x1, s1, f2, x2, s2, language, platform, flags | ADGF_CD, GUIO4(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieTLC)
#define TLCDVDENTRY(f1, x1, s1, f2, x2, s2, language, platform) \
- GROOVIEGAME("tlc", MetaEngineDetection::GAME_NOT_IMPLEMENTED, f1, x1, s1, f2, x2, s2, language, platform, ADGF_UNSUPPORTED | ADGF_DVD, GUIO4(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieTLC)
+ GROOVIEGAME("tlc", MetaEngineDetection::GAME_NOT_IMPLEMENTED, f1, x1, s1, f2, x2, s2, language, platform, ADGF_DVD, GUIO4(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_SLIMHOTSPOTS, GAMEOPTION_SPEEDRUN), kGroovieTLC)
#define TLCDEMOENTRY(f1, x1, s1, f2, x2, s2, language, platform, flags) \
GROOVIEGAME("tlc", "Demo", f1, x1, s1, f2, x2, s2, language, platform, flags | ADGF_DEMO, GUIO3(GUIO_NOMIDI, GUIO_NOASPECT, GUIO_NOLAUNCHLOAD), kGroovieTLC)
@@ -125,7 +125,7 @@ static const GroovieGameDescription gameDescriptions[] = {
// The 7th Guest DOS Russian (Akella)
T7GENTRY("", "script.grv", "d1b8033b40aa67c076039881eccce90d", 16659,
"intro.gjd", nullptr, 31711554, RU_RUS, kPlatformDOS, BASE_FLAGS),
-
+
// The 7th Guest iOS English
T7GNOMIDIENTRY("", "script.grv", "d1b8033b40aa67c076039881eccce90d", 16659,
"SeventhGuest", nullptr, AD_NO_SIZE, EN_ANY, kPlatformIOS, BASE_FLAGS, GAMEOPTION_ORIGINAL_SAVELOAD GAMEOPTION_EASIER_AI),
@@ -179,7 +179,7 @@ static const GroovieGameDescription gameDescriptions[] = {
/*==== The Making of The 11th Hour ====*/
// all are in english even if they came packaged with alternate language versions of the game
// I removed the hash check for now so they all match with a single entry since the language field is useless here
-
+
// The Making of The 11th Hour DOS/Windows
T11HMAKINGOFENTRY("makingof.grv", nullptr, 994, "zmakd2a.gjd", nullptr, AD_NO_SIZE, EN_ANY, kPlatformWindows),
Commit: d7ff1d460dda3638a5811ddde4fbb9a4f1219afe
https://github.com/scummvm/scummvm/commit/d7ff1d460dda3638a5811ddde4fbb9a4f1219afe
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-12-28T16:49:57+01:00
Commit Message:
GROOVIE: Improve cursor-related debug output
Changed paths:
engines/groovie/cursor.cpp
diff --git a/engines/groovie/cursor.cpp b/engines/groovie/cursor.cpp
index 3667e2ba7af..2c0f9fd07ca 100644
--- a/engines/groovie/cursor.cpp
+++ b/engines/groovie/cursor.cpp
@@ -270,19 +270,19 @@ Cursor_v2::Cursor_v2(Common::File &file) {
uint16 tmp16;
int loop2count = file.readUint16LE();
- debugC(5, kDebugCursor, "loop2count?: %d\n", loop2count);
+ debugC(5, kDebugCursor, "loop2count?: %d", loop2count);
for (int l = 0; l < loop2count; l++) {
tmp16 = file.readUint16LE();
- debugC(5, kDebugCursor, "loop2a: %d\n", tmp16); // Index frame can merge to/from?
+ debugC(5, kDebugCursor, "loop2a: %d", tmp16); // Index frame can merge to/from?
tmp16 = file.readUint16LE();
- debugC(5, kDebugCursor, "loop2b: %d\n", tmp16); // Number of frames?
+ debugC(5, kDebugCursor, "loop2b: %d", tmp16); // Number of frames?
}
file.read(pal, 0x20 * 3);
for (int f = 0; f < _numFrames; f++) {
uint32 tmp32 = file.readUint32LE();
- debugC(5, kDebugCursor, "loop3: %d\n", tmp32);
+ debugC(5, kDebugCursor, "loop3: %d", tmp32);
byte *data = new byte[tmp32];
file.read(data, tmp32);
Commit: 22b5715c15224851a69938b6aefde635edcbb546
https://github.com/scummvm/scummvm/commit/22b5715c15224851a69938b6aefde635edcbb546
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-12-28T16:49:57+01:00
Commit Message:
GROOVIE: Gracefully process bad cursor format
Changed paths:
engines/groovie/cursor.cpp
diff --git a/engines/groovie/cursor.cpp b/engines/groovie/cursor.cpp
index 2c0f9fd07ca..c52e698e4fb 100644
--- a/engines/groovie/cursor.cpp
+++ b/engines/groovie/cursor.cpp
@@ -250,7 +250,7 @@ private:
Graphics::PixelFormat _format;
- void decodeFrame(byte *pal, byte *data, byte *dest);
+ void decodeFrame(byte *pal, byte *data, byte *dest, uint32 size);
};
Cursor_v2::Cursor_v2(Common::File &file) {
@@ -286,7 +286,7 @@ Cursor_v2::Cursor_v2(Common::File &file) {
byte *data = new byte[tmp32];
file.read(data, tmp32);
- decodeFrame(pal, data, _img + (f * _width * _height * 4));
+ decodeFrame(pal, data, _img + (f * _width * _height * 4), tmp32);
delete[] data;
}
@@ -298,7 +298,7 @@ Cursor_v2::~Cursor_v2() {
delete[] _img;
}
-void Cursor_v2::decodeFrame(byte *pal, byte *data, byte *dest) {
+void Cursor_v2::decodeFrame(byte *pal, byte *data, byte *dest, uint32 size) {
// Scratch memory
byte *tmp = new byte[_width * _height * 4]();
byte *ptr = tmp;
@@ -314,14 +314,23 @@ void Cursor_v2::decodeFrame(byte *pal, byte *data, byte *dest) {
// Start frame decoding
for (int y = 0; y < _height; y++) {
for (int x = 0; x < _width; x++) {
+ if (!size) {
+ debugC(1, kDebugCursor, "Cursor_v2::decodeFrame(): Frame underflow");
+ delete[] tmp;
+ return;
+ }
+
// If both counters are empty
if (ctrA == 0 && ctrB == 0) {
if (*data & 0x80) {
ctrA = (*data++ & 0x7F) + 1;
+ size--;
} else {
ctrB = *data++ + 1;
alpha = alphaDecoded[(*data & 0xE0) >> 5];
palIdx = *data++ & 0x1F;
+
+ size -= 2;
}
}
@@ -329,6 +338,7 @@ void Cursor_v2::decodeFrame(byte *pal, byte *data, byte *dest) {
// Block type A - chunk of non-continuous pixels
palIdx = *data & 0x1F;
alpha = alphaDecoded[(*data++ & 0xE0) >> 5];
+ size--;
r = *(pal + palIdx);
g = *(pal + palIdx + 0x20);
Commit: 9628c6db5217391fae1e34d3b70c10a3c43494fa
https://github.com/scummvm/scummvm/commit/9628c6db5217391fae1e34d3b70c10a3c43494fa
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-12-28T16:49:57+01:00
Commit Message:
GROOVIE: Safer tlc-dvd resource processing
Changed paths:
engines/groovie/resource.cpp
diff --git a/engines/groovie/resource.cpp b/engines/groovie/resource.cpp
index 8a9366a84c1..6d4ea68e00f 100644
--- a/engines/groovie/resource.cpp
+++ b/engines/groovie/resource.cpp
@@ -46,19 +46,19 @@ Common::SeekableReadStream *ResMan::open(uint32 fileRef) {
}
Common::SeekableReadStream *ResMan::open(const ResInfo &resInfo) {
- // Is this a raw vob file? (TLC DVD)
- if (resInfo.gjd >= 1000) {
- Common::Path filename = Common::Path(Common::String::format("VOB%u.VOB", resInfo.offset));
- if (!Common::File::exists(filename)) {
- return nullptr;
- }
- Common::File *vobFile = new Common::File();
- vobFile->open(filename);
- return new Common::SeekableSubReadStream(vobFile, 0, vobFile->size(), DisposeAfterUse::YES);
- }
-
// Do we know the name of the required GJD?
if (resInfo.gjd >= _gjds.size()) {
+ // Is this a raw vob file? (TLC DVD)
+ if (resInfo.gjd >= 1000) {
+ Common::Path filename = Common::Path(Common::String::format("VOB%u.VOB", resInfo.offset));
+ if (!Common::File::exists(filename)) {
+ return nullptr;
+ }
+ Common::File *vobFile = new Common::File();
+ vobFile->open(filename);
+ return vobFile;
+ }
+
error("Groovie::Resource: Unknown GJD %d", resInfo.gjd);
return nullptr;
}
@@ -94,6 +94,10 @@ Common::SeekableReadStream *ResMan::open(const ResInfo &resInfo) {
Common::String ResMan::getGjdName(const ResInfo &resInfo) {
if (resInfo.gjd >= _gjds.size()) {
+ if (resInfo.gjd >= 1000) {
+ return Common::String::format("VOB%u.VOB", resInfo.offset);
+ }
+
error("Groovie::Resource: Unknown GJD %d", resInfo.gjd);
}
Commit: fdec10cca87770c834577d6cd6fa21d79002ab39
https://github.com/scummvm/scummvm/commit/fdec10cca87770c834577d6cd6fa21d79002ab39
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-12-28T16:49:58+01:00
Commit Message:
GROOVIE: Avoid double free on MPEG videos
The MPEG video player is freeing the stream by itself which leads
to double free when next movie is starting playback
Changed paths:
engines/groovie/script.cpp
engines/groovie/video/player.h
engines/groovie/video/roq.cpp
engines/groovie/video/roq.h
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index fb6813e4e5e..46c3ceccc1d 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -936,7 +936,9 @@ bool Script::playvideofromref(uint32 fileref, bool loopUntilAudioDone) {
// Close the previous video file
if (_videoFile) {
_videoRef = uint32(-1);
- delete _videoFile;
+
+ if (!_vm->_videoPlayer->isFileHandled())
+ delete _videoFile;
}
if (fileref == uint32(-1))
@@ -1037,7 +1039,8 @@ bool Script::playvideofromref(uint32 fileref, bool loopUntilAudioDone) {
// The video has ended, or it was being looped and the audio has ended.
// Close the file
- delete _videoFile;
+ if (!_vm->_videoPlayer->isFileHandled())
+ delete _videoFile;
_videoFile = nullptr;
_videoRef = uint32(-1);
diff --git a/engines/groovie/video/player.h b/engines/groovie/video/player.h
index 4d86e834aaa..73118282c7f 100644
--- a/engines/groovie/video/player.h
+++ b/engines/groovie/video/player.h
@@ -52,6 +52,8 @@ public:
void loadSubtitles(const char *fname) { _subtitles.loadSRTFile(fname); }
void unloadSubtitles();
+ virtual bool isFileHandled() { return false; }
+
protected:
// To be implemented by subclasses
virtual uint16 loadInternal() = 0;
diff --git a/engines/groovie/video/roq.cpp b/engines/groovie/video/roq.cpp
index 0dd36b3698a..0d3222e7986 100644
--- a/engines/groovie/video/roq.cpp
+++ b/engines/groovie/video/roq.cpp
@@ -197,10 +197,14 @@ uint16 ROQPlayer::loadInternal() {
if (blockHeader.type == 0) {
_videoDecoder = new Video::MPEGPSDecoder();
_videoDecoder->loadStream(_file);
+
+ _isFileHandled = true;
return 24;
}
+
delete _videoDecoder;
_videoDecoder = nullptr;
+ _isFileHandled = false;
#endif
if (blockHeader.type != 0x1084) {
diff --git a/engines/groovie/video/roq.h b/engines/groovie/video/roq.h
index 43a1038274d..c5f863bc632 100644
--- a/engines/groovie/video/roq.h
+++ b/engines/groovie/video/roq.h
@@ -52,6 +52,8 @@ public:
void drawString(Graphics::Surface *surface, const Common::String text, int posx, int posy, uint32 color, bool blackBackground) override;
void copyfgtobg(uint8 arg) override;
+ bool isFileHandled() override { return _isFileHandled; }
+
protected:
void waitFrame() override;
uint16 loadInternal() override;
@@ -120,6 +122,7 @@ private:
Common::Rect *_restoreArea; // Area to be repainted by foreground
Video::VideoDecoder *_videoDecoder;
+ bool _isFileHandled;
};
class ROQSoundPlayer : public ROQPlayer {
Commit: 781bc8dc7a18c852600e8baba7d3b81ac3a82f0d
https://github.com/scummvm/scummvm/commit/781bc8dc7a18c852600e8baba7d3b81ac3a82f0d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-12-28T16:49:58+01:00
Commit Message:
GROOVIE: Hook in tlc-dvd MPEG audio
Changed paths:
engines/groovie/video/roq.cpp
diff --git a/engines/groovie/video/roq.cpp b/engines/groovie/video/roq.cpp
index 0d3222e7986..e85b0d957fa 100644
--- a/engines/groovie/video/roq.cpp
+++ b/engines/groovie/video/roq.cpp
@@ -196,8 +196,11 @@ uint16 ROQPlayer::loadInternal() {
#ifdef USE_MPEG2
if (blockHeader.type == 0) {
_videoDecoder = new Video::MPEGPSDecoder();
+ _videoDecoder->setSoundType(Audio::Mixer::kSFXSoundType);
_videoDecoder->loadStream(_file);
+ _videoDecoder->start();
+
_isFileHandled = true;
return 24;
}
Commit: 08ede3f5bad0f6828530ac43030827bf508dc583
https://github.com/scummvm/scummvm/commit/08ede3f5bad0f6828530ac43030827bf508dc583
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-12-28T16:49:58+01:00
Commit Message:
GROOVIE: Gracefully process end of DVD video
Changed paths:
engines/groovie/video/roq.cpp
diff --git a/engines/groovie/video/roq.cpp b/engines/groovie/video/roq.cpp
index e85b0d957fa..20ffc304658 100644
--- a/engines/groovie/video/roq.cpp
+++ b/engines/groovie/video/roq.cpp
@@ -477,8 +477,10 @@ bool ROQPlayer::playFrameInternal() {
_currBuf->free();
delete _currBuf;
_currBuf = new Graphics::Surface();
- _currBuf->copyFrom(*srcSurf);
- buildShowBuf();
+ if (srcSurf) {
+ _currBuf->copyFrom(*srcSurf);
+ buildShowBuf();
+ }
return _videoDecoder->endOfVideo();
}
#endif
Commit: 4b6ee4b08f41f796ed5601ecf132fa41a5b62483
https://github.com/scummvm/scummvm/commit/4b6ee4b08f41f796ed5601ecf132fa41a5b62483
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-12-28T16:49:58+01:00
Commit Message:
GROVIE: Sync video playback with audio
Changed paths:
engines/groovie/video/roq.cpp
diff --git a/engines/groovie/video/roq.cpp b/engines/groovie/video/roq.cpp
index 20ffc304658..42dc7140567 100644
--- a/engines/groovie/video/roq.cpp
+++ b/engines/groovie/video/roq.cpp
@@ -473,6 +473,9 @@ bool ROQPlayer::playFrameInternal() {
#ifdef USE_MPEG2
if (_videoDecoder) {
+ if (!_videoDecoder->needsUpdate())
+ return false; // Video has not yet ended
+
const Graphics::Surface *srcSurf = _videoDecoder->decodeNextFrame();
_currBuf->free();
delete _currBuf;
More information about the Scummvm-git-logs
mailing list