Fix an issue where rewind-to-HTTP-header would not properly work.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 18 Aug 2013 11:46:22 +0000 (13:46 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 18 Aug 2013 11:46:22 +0000 (13:46 +0200)
server.cpp

index 4442b34..8790633 100644 (file)
@@ -255,8 +255,9 @@ void Server::set_header(int stream_index, const string &http_header, const strin
             client_it != clients.end();
             ++client_it) {
                Client *client = &client_it->second;
-               if (client->state == Client::SENDING_DATA &&
-                   client->stream_pos == 0) {
+               if (client->state == Client::WAITING_FOR_KEYFRAME ||
+                   (client->state == Client::SENDING_DATA &&
+                    client->stream_pos == 0)) {
                        construct_header(client);
                }
        }