From b524af7e8132f518fca8388988cd0a43e2328aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 16 Sep 2010 13:55:11 +0000 Subject: [PATCH] In case of time-out to generate a frame, leave the last frame on-screen, instead of going black until catching up. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38672 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../media_node_framework/video/VideoProducer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/apps/mediaplayer/media_node_framework/video/VideoProducer.cpp b/src/apps/mediaplayer/media_node_framework/video/VideoProducer.cpp index badd21bef1..c843db9cb0 100644 --- a/src/apps/mediaplayer/media_node_framework/video/VideoProducer.cpp +++ b/src/apps/mediaplayer/media_node_framework/video/VideoProducer.cpp @@ -745,6 +745,14 @@ VideoProducer::_FrameGeneratorThread() err = fSupplier->FillBuffer(playlistFrame, buffer->Data(), fConnectedFormat, forceSendingBuffer, wasCached); + if (err == B_TIMED_OUT) { + // Don't send the buffer if there was insufficient + // time for rendering, this will leave the last + // valid frame on screen until we catch up, instead + // of going black. + wasCached = true; + err = B_OK; + } // clean the buffer if something went wrong if (err != B_OK) { // TODO: should use "back value" according