aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/video/coktel_decoder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp
index 3ee4bdcdda..f5813db8df 100644
--- a/graphics/video/coktel_decoder.cpp
+++ b/graphics/video/coktel_decoder.cpp
@@ -1400,7 +1400,7 @@ bool IMDDecoder::renderFrame(Common::Rect &rect) {
}
void IMDDecoder::nextSoundSlice(bool hasNextCmd) {
- if (hasNextCmd || !_soundEnabled) {
+ if (hasNextCmd || !_soundEnabled || !_audioStream) {
// Skip sound
_stream->skip(_soundSliceSize);
@@ -1420,7 +1420,7 @@ void IMDDecoder::nextSoundSlice(bool hasNextCmd) {
bool IMDDecoder::initialSoundSlice(bool hasNextCmd) {
int dataLength = _soundSliceSize * _soundSlicesCount;
- if (hasNextCmd || !_soundEnabled) {
+ if (hasNextCmd || !_soundEnabled || !_audioStream) {
// Skip sound
_stream->skip(dataLength);
@@ -1440,7 +1440,7 @@ bool IMDDecoder::initialSoundSlice(bool hasNextCmd) {
}
void IMDDecoder::emptySoundSlice(bool hasNextCmd) {
- if (hasNextCmd || !_soundEnabled)
+ if (hasNextCmd || !_soundEnabled || !_audioStream)
return;
// Create an empty sound buffer and queue it