Bug 1109644 - Part 3: Make MediaEngineDefaultVideoSource use GetEndOfAppendedData instead of aLastEndTime. r=jesup, a=sledru
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 30 Dec 2014 14:54:02 +1300
changeset 242679 109b4fe07cd655c6b79e514939ad3455c9dadfcd
parent 242678 4527a6412ae2386129d242cbdebf99674e803d42
child 242680 6af0ae87373c131ad5bb5ee3e948ccee453bc843
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, sledru
bugs1109644
milestone36.0a2
Bug 1109644 - Part 3: Make MediaEngineDefaultVideoSource use GetEndOfAppendedData instead of aLastEndTime. r=jesup, a=sledru
dom/media/webrtc/MediaEngineDefault.cpp
--- a/dom/media/webrtc/MediaEngineDefault.cpp
+++ b/dom/media/webrtc/MediaEngineDefault.cpp
@@ -235,17 +235,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)) {