X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=stream.cpp;h=87a7db771f51032f790abce1d3de8b34376d5ed0;hp=6bb86c41e0fc8332bfe4f08a207708d3613fef45;hb=d4f9b205e5091c496f0367dcd4dcc29e0a842f7f;hpb=ce0d42a14da5686366d0c73fa9b152e90619ff91 diff --git a/stream.cpp b/stream.cpp index 6bb86c4..87a7db7 100644 --- a/stream.cpp +++ b/stream.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -59,25 +60,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); }