]> git.sesse.net Git - cubemap/commitdiff
Do not serialize prebuffering_bytes in StreamProto.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 6 Apr 2018 17:13:21 +0000 (19:13 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 6 Apr 2018 17:13:21 +0000 (19:13 +0200)
There's no need to do this now that we can't have zombie streams anymore
(to be honest, the reason used to be rather thin already; it probably was
rather unintentional).

state.proto
stream.cpp

index 35d5c505c7a157c072cc3e312f2aff66da5f9206..e6aefb51f7515bf4d6306e6303461d50805cbf9a 100644 (file)
@@ -28,7 +28,7 @@ message StreamProto {
        optional bytes stream_header = 7;
        repeated int32 data_fds = 8;
        optional int64 backlog_size = 5 [default=10485760];
-       optional int64 prebuffering_bytes = 10 [default=0];
+       // Tag 10 is unused from 1.4.0 up (it used to be prebuffering_bytes).
        optional int64 bytes_received = 3;
        repeated int64 suitable_starting_point = 9;
        optional string url = 4;
index 3a4ccc3ed88065a87738796e00e0b0cda627fb55..0b494fb8d5527d4ba51290d62b109ad510f4cc9a 100644 (file)
@@ -46,7 +46,6 @@ Stream::Stream(const StreamProto &serialized, int data_fd)
          encoding(Stream::STREAM_ENCODING_RAW),  // Will be changed later.
          data_fd(data_fd),
          backlog_size(serialized.backlog_size()),
-         prebuffering_bytes(serialized.prebuffering_bytes()),
          bytes_received(serialized.bytes_received())
 {
        if (data_fd == -1) {
@@ -71,7 +70,6 @@ StreamProto Stream::serialize()
        serialized.set_stream_header(stream_header);
        serialized.add_data_fds(data_fd);
        serialized.set_backlog_size(backlog_size);
-       serialized.set_prebuffering_bytes(prebuffering_bytes);
        serialized.set_bytes_received(bytes_received);
        for (size_t point : suitable_starting_points) {
                serialized.add_suitable_starting_point(point);