Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1235)

Unified Diff: talk/media/webrtc/webrtcvideoengine2.cc

Issue 1345473002: Reset frame timestamp epoch for new capturers. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: uint32 cast Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: talk/media/webrtc/webrtcvideoengine2.cc
diff --git a/talk/media/webrtc/webrtcvideoengine2.cc b/talk/media/webrtc/webrtcvideoengine2.cc
index e94c0b1794919c854b26205fa26e912962db27b9..917efc8c50c8c1bb516ef441329104c931d07080 100644
--- a/talk/media/webrtc/webrtcvideoengine2.cc
+++ b/talk/media/webrtc/webrtcvideoengine2.cc
@@ -1881,6 +1881,10 @@ bool WebRtcVideoChannel2::WebRtcVideoSendStream::SetCapturer(
{
rtc::CritScope cs(&lock_);
+ // Reset timestamps to realign new incoming frames to a webrtc timestamp. A
+ // new capturer may have a different timestamp delta than the previous one.
+ first_frame_timestamp_ms_ = 0;
+
if (capturer == NULL) {
if (stream_ != NULL) {
LOG(LS_VERBOSE) << "Disabling capturer, sending black frame.";

Powered by Google App Engine
This is Rietveld 408576698