]> git.sesse.net Git - cubemap/blobdiff - server.cpp
Fix an ineffective assert.
[cubemap] / server.cpp
index 61bdb3f698503a7dc3bdd9e8c838bc81532e682a..5c1f31bef451300f5cdf335261a7c9fd2aaedbae 100644 (file)
@@ -435,7 +435,6 @@ void Server::set_hls_backlog_margin(int stream_index, size_t hls_backlog_margin)
 {
        lock_guard<mutex> lock(mu);
        assert(stream_index >= 0 && stream_index < ssize_t(streams.size()));
-       assert(hls_backlog_margin >= 0);
        assert(hls_backlog_margin < streams[stream_index]->backlog_size);
        streams[stream_index]->hls_backlog_margin = hls_backlog_margin;
 }
@@ -650,7 +649,7 @@ sending_header_or_short_response_again:
                } else if (client->stream_pos_end != Client::STREAM_POS_NO_END) {
                        // We're sending a fragment, and should have all of it,
                        // so start sending right away.
-                       assert(client->stream_pos >= 0);
+                       assert(ssize_t(client->stream_pos) >= 0);
                        client->state = Client::SENDING_DATA;
                        goto sending_data;
                } else if (stream->prebuffering_bytes == 0) {
@@ -672,7 +671,7 @@ sending_header_or_short_response_again:
                        // 100 kB prebuffer but end up sending a 10 MB GOP.
                        assert(client->stream_pos == Client::STREAM_POS_AT_END);
                        assert(client->stream_pos_end == Client::STREAM_POS_NO_END);
-                       deque<size_t>::const_iterator starting_point_it =
+                       deque<uint64_t>::const_iterator starting_point_it =
                                lower_bound(stream->suitable_starting_points.begin(),
                                            stream->suitable_starting_points.end(),
                                            stream->bytes_received - stream->prebuffering_bytes);