Author: stippi Date: 2010-09-16 15:55:11 +0200 (Thu, 16 Sep 2010) New Revision: 38672 Changeset: http://dev.haiku-os.org/changeset/38672 Modified: haiku/trunk/src/apps/mediaplayer/media_node_framework/video/VideoProducer.cpp Log: In case of time-out to generate a frame, leave the last frame on-screen, instead of going black until catching up. Modified: haiku/trunk/src/apps/mediaplayer/media_node_framework/video/VideoProducer.cpp =================================================================== --- haiku/trunk/src/apps/mediaplayer/media_node_framework/video/VideoProducer.cpp 2010-09-16 12:45:03 UTC (rev 38671) +++ haiku/trunk/src/apps/mediaplayer/media_node_framework/video/VideoProducer.cpp 2010-09-16 13:55:11 UTC (rev 38672) @@ -745,6 +745,14 @@ 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