Treat negative ntp time as unset.
The video send pipeline uses the magic value 0 for an unset ntp time. However, the receive pipeline uses the magic value -1 for unset (unclear where, it seems it behaved differently a few months ago). This makes cl https://codereview.webrtc.org/2469993003/ fail the P2PTestConductor.ForwardVideoOnlyStream, because that cl removes code which always clears the ntp time, and enables propagation of ntp time from the receive pipeline to the send pipeline. Treating ntp time <= 0 as unset is a small improvement. Ultimately, a VideoFrame shouldn't carry an ntp time at all. BUG=webrtc:5740,webrtc:6977 Review-Url: https://codereview.webrtc.org/2620383005 Cr-Commit-Position: refs/heads/master@{#16035}
This commit is contained in:
parent
b66129a27e
commit
891419f8e8
@ -464,7 +464,7 @@ void ViEEncoder::OnFrame(const VideoFrame& video_frame) {
|
||||
|
||||
// Capture time may come from clock with an offset and drift from clock_.
|
||||
int64_t capture_ntp_time_ms;
|
||||
if (video_frame.ntp_time_ms() != 0) {
|
||||
if (video_frame.ntp_time_ms() > 0) {
|
||||
capture_ntp_time_ms = video_frame.ntp_time_ms();
|
||||
} else if (video_frame.render_time_ms() != 0) {
|
||||
capture_ntp_time_ms = video_frame.render_time_ms() + delta_ntp_internal_ms_;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user