Bug 1109644. Part 3: Make MediaEngineDefaultVideoSource use GetEndOfAppendedData instead of aLastEndTime. r=jesup
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 30 Dec 2014 14:54:02 +1300
changeset 247535 2199fa1fc9cb7e67c4aefcc348774c5edb70f3bc
parent 247534 ca7246eb4da099e4298824e59ca3ee4a4170ab5a
child 247536 412b935dc4a8799c8bf8f3bfd091f919eb6f8af6
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1109644
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1109644. Part 3: Make MediaEngineDefaultVideoSource use GetEndOfAppendedData instead of aLastEndTime. r=jesup
dom/media/webrtc/MediaEngineDefault.cpp
--- a/dom/media/webrtc/MediaEngineDefault.cpp
+++ b/dom/media/webrtc/MediaEngineDefault.cpp
@@ -251,17 +251,17 @@ MediaEngineDefaultVideoSource::NotifyPul
   VideoSegment segment;
   MonitorAutoLock lock(mMonitor);
   if (mState != kStarted) {
     return;
   }
 
   // Note: we're not giving up mImage here
   nsRefPtr<layers::Image> image = mImage;
-  StreamTime delta = aDesiredTime - aLastEndTime;
+  StreamTime delta = aDesiredTime - aSource->GetEndOfAppendedData(aID);
 
   if (delta > 0) {
     // nullptr images are allowed
     IntSize size(image ? mOpts.mWidth : 0, image ? mOpts.mHeight : 0);
     segment.AppendFrame(image.forget(), delta, size);
     // This can fail if either a) we haven't added the track yet, or b)
     // we've removed or finished the track.
     if (aSource->AppendToTrack(aID, &segment)) {