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);
}
}