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

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

Issue 1352433002: Reset frame timestamp epoch for new capturers. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@46
Patch Set: 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
« no previous file with comments | « talk/media/base/fakevideocapturer.h ('k') | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvideoengine2.cc
diff --git a/talk/media/webrtc/webrtcvideoengine2.cc b/talk/media/webrtc/webrtcvideoengine2.cc
index a3f8b8e7acc75fa6d76b7398595ffdfc6673c827..c810b5b06871659c4984d2a4adb64ac5a0c59b93 100644
--- a/talk/media/webrtc/webrtcvideoengine2.cc
+++ b/talk/media/webrtc/webrtcvideoengine2.cc
@@ -1783,6 +1783,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.";
« no previous file with comments | « talk/media/base/fakevideocapturer.h ('k') | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698