Skip to content

Commit f8d604d

Browse files
M0Rf30sev-
authored andcommitted
DIRECTOR: Decode off-screen digital videos used as timing clocks
A zero-sized video sprite is never rendered, so createWidget() returned before decoding a frame and left a playing decoder unpumped; its audio-mastered clock then stalled after the initial buffer. Fixes the frozen, silent intro in opera fatal, which advances scenes from `the movieTime` of the off-stage CON0822.MOV (opera\intro\intro)
1 parent df4e258 commit f8d604d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎engines/director/castmember/digitalvideo.cpp‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,13 @@ Graphics::MacWidget *DigitalVideoCastMember::createWidget(Common::Rect &bbox, Ch
478478
}
479479
}
480480

481-
// Zero-sized bbox: nothing to render, and scaling to it would divide by zero.
482-
if (bbox.width() <= 0 || bbox.height() <= 0)
481+
// Zero-sized bbox: nothing to render. Still pump the decoder so an
482+
// invisible video used only as a timing/audio clock keeps advancing.
483+
if (bbox.width() <= 0 || bbox.height() <= 0) {
484+
if (_channel && _channel->_movieRate != 0.0 && _video->needsUpdate())
485+
_video->decodeNextFrame();
483486
return nullptr;
487+
}
484488

485489
Graphics::MacWidget *widget = new Graphics::MacWidget(g_director->getCurrentWindow()->getMacWindow(), bbox.left, bbox.top, bbox.width(), bbox.height(), g_director->_wm, false);
486490

0 commit comments

Comments
 (0)