Unwrap picture ids in the RtpFrameReferencerFinder.
First CL to avoid working with wrapping picture ids. After the references of
a frame has been determined they are then unwrapped.
BUG=webrtc:7874
Review-Url: https://codereview.webrtc.org/2985283002
Cr-Commit-Position: refs/heads/master@{#19663}
diff --git a/webrtc/modules/video_coding/sequence_number_util.h b/webrtc/modules/video_coding/sequence_number_util.h
index 008e5f1..05f3367 100644
--- a/webrtc/modules/video_coding/sequence_number_util.h
+++ b/webrtc/modules/video_coding/sequence_number_util.h
@@ -91,7 +91,13 @@
"Type unwrapped must be an unsigned integer smaller than uint64_t.");
public:
- SeqNumUnwrapper() : last_unwrapped_(0) {}
+ // We want a value that is close to 2^63 for two reasons. Firstly, we
+ // can unwrap wrapping numbers in either direction, and secondly, we avoid
+ // causing a crash on bad input. We also want the default value to be somewhat
+ // human readable, a power of 10 for example.
+ static constexpr uint64_t kDefaultStartValue = 10000000000000000000UL;
+
+ SeqNumUnwrapper() : last_unwrapped_(kDefaultStartValue) {}
explicit SeqNumUnwrapper(uint64_t start_at) : last_unwrapped_(start_at) {}
uint64_t Unwrap(T value) {