]> git.sesse.net Git - cubemap/commitdiff
Add a helper variable.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 23 Jul 2015 16:22:03 +0000 (18:22 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 23 Jul 2015 16:36:42 +0000 (18:36 +0200)
server.cpp

index a418d1c660d409b0ea85162696f9a33de01dc330..d81181806f101c340fae84a5da8f02e20f6f9190 100644 (file)
@@ -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.
                // 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<size_t>(
                if (client->stream_pos == size_t(-2)) {
                        client->stream_pos = std::min<size_t>(
-                           client->stream->bytes_received - client->stream->backlog_size,
+                           stream->bytes_received - stream->backlog_size,
                            0);
                        client->state = Client::SENDING_DATA;
                } else {
                            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->state = Client::WAITING_FOR_KEYFRAME;
                }
-               client->stream->put_client_to_sleep(client);
+               stream->put_client_to_sleep(client);
                return;
        }
        case Client::WAITING_FOR_KEYFRAME: {
                return;
        }
        case Client::WAITING_FOR_KEYFRAME: {