From b82ac6aed320ab25c80acc210b20f8d710601d2e Mon Sep 17 00:00:00 2001 From: ilnik Date: Tue, 2 May 2017 00:48:41 -0700 Subject: [PATCH] Fix video_loopback to work with -duration flag: add missing ntp_timestamp to frames BUG=none Review-Url: https://codereview.webrtc.org/2852463002 Cr-Commit-Position: refs/heads/master@{#17967} --- webrtc/video/video_quality_test.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webrtc/video/video_quality_test.cc b/webrtc/video/video_quality_test.cc index 508ba13c83..b5541702dd 100644 --- a/webrtc/video/video_quality_test.cc +++ b/webrtc/video/video_quality_test.cc @@ -909,11 +909,13 @@ class VideoAnalyzer : public PacketReceiver, // Frames from the capturer does not have a rtp timestamp. // Create one so it can be used for comparison. RTC_DCHECK_EQ(0, video_frame.timestamp()); + if (copy.ntp_time_ms() == 0) + copy.set_ntp_time_ms(rtc::TimeMillis()); copy.set_timestamp(copy.ntp_time_ms() * 90); analyzer_->AddCapturedFrameForComparison(copy); rtc::CritScope lock(&crit_); if (send_stream_input_) - send_stream_input_->OnFrame(video_frame); + send_stream_input_->OnFrame(copy); } // Called when |send_stream_.SetSource()| is called.