From cf42ca89d3a6853caec15f032bab502f31a089dd Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 23 Jul 2015 18:22:03 +0200 Subject: [PATCH] Add a helper variable. --- server.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server.cpp b/server.cpp index a418d1c..d811818 100644 --- a/server.cpp +++ b/server.cpp @@ -473,16 +473,17 @@ sending_header_or_error_again: // words, we won't send any of the backlog, but we'll start // sending immediately as we get the next keyframe block. // This is postcondition #3. + Stream *stream = client->stream; if (client->stream_pos == size_t(-2)) { client->stream_pos = std::min( - client->stream->bytes_received - client->stream->backlog_size, + stream->bytes_received - stream->backlog_size, 0); client->state = Client::SENDING_DATA; } else { - client->stream_pos = client->stream->bytes_received; + client->stream_pos = stream->bytes_received; client->state = Client::WAITING_FOR_KEYFRAME; } - client->stream->put_client_to_sleep(client); + stream->put_client_to_sleep(client); return; } case Client::WAITING_FOR_KEYFRAME: { -- 2.39.2