X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=stream.cpp;h=23f478902d3f6f1dd055511c6b33562bd8860c0a;hb=refs%2Ftags%2F1.0.2;hp=6bb86c41e0fc8332bfe4f08a207708d3613fef45;hpb=ce0d42a14da5686366d0c73fa9b152e90619ff91;p=cubemap diff --git a/stream.cpp b/stream.cpp index 6bb86c4..23f4789 100644 --- a/stream.cpp +++ b/stream.cpp @@ -59,25 +59,8 @@ Stream::Stream(const StreamProto &serialized, int data_fd) exit(1); } - // 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(); pthread_mutex_init(&queued_data_mutex, NULL); }