- // Split old-style headers into HTTP and video headers.
- if (!serialized.header().empty()) {
- string header = serialized.header();
- size_t split = header.find("\r\n\r\n");
- if (split == string::npos) {
- http_header = header;
- stream_header = "";
- } else {
- http_header = header.substr(0, split + 2); // Split off the second \r\n.
- stream_header = header.substr(split, string::npos);
- }
- }
-
- // Older versions did not set last_suitable_starting_point.
- if (serialized.has_last_suitable_starting_point()) {
- last_suitable_starting_point = serialized.last_suitable_starting_point();
- } else {
- last_suitable_starting_point = bytes_received;
- }
+ assert(serialized.has_last_suitable_starting_point());
+ last_suitable_starting_point = serialized.last_suitable_starting_point();