From: Steinar H. Gunderson Date: Thu, 23 Jul 2015 16:22:03 +0000 (+0200) Subject: Add a helper variable. X-Git-Tag: 1.2.0~6 X-Git-Url: https://git.sesse.net/?p=cubemap;a=commitdiff_plain;h=cf42ca89d3a6853caec15f032bab502f31a089dd Add a helper variable. --- 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: {