From 1e855e8d1c20eb8cd85883be911918c6a23e0a35 Mon Sep 17 00:00:00 2001 From: badaix Date: Wed, 9 Sep 2015 07:46:21 +0200 Subject: [PATCH] fixed stream age calculation --- client/stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/stream.cpp b/client/stream.cpp index 0c78d79c..0da563c0 100644 --- a/client/stream.cpp +++ b/client/stream.cpp @@ -221,7 +221,7 @@ bool Stream::getPlayerChunk(void* outputBuffer, const cs::usec& outputBufferDacT /// age = 0 => play now /// age < 0 => play in -age /// age > 0 => too old - cs::usec age = std::chrono::duration_cast(TimeProvider::serverNow() - chunk_->start() - bufferMs_ + outputBufferDacTime); + cs::usec age = std::chrono::duration_cast(TimeProvider::serverNow() - chunk_->start()) - bufferMs_ + outputBufferDacTime; if ((sleep_.count() == 0) && (cs::abs(age) > cs::msec(200))) { logO << "age > 200: " << cs::duration(age) << "\n";