Bug 1660144 - On disabling VideoFrameConverter, take a path that actually turns the frame black. r=jib
authorAndreas Pehrson <apehrson@mozilla.com>
Fri, 21 Aug 2020 12:50:32 +0000
changeset 545642 0cb072c2593a50638877fd4e03ba19d2651b9a05
parent 545641 4c02a0f5d8a5ba92a3a7fe01ad7a4bbcabb0f938
child 545643 28eda77a6032fa4eff80dc3bd7900736006c24d4
push id37718
push usernbeleuzu@mozilla.com
push dateFri, 21 Aug 2020 21:46:48 +0000
treeherdermozilla-central@432e42cbbc41 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1660144
milestone81.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 1660144 - On disabling VideoFrameConverter, take a path that actually turns the frame black. r=jib Depends on D87790 Differential Revision: https://phabricator.services.mozilla.com/D87791
dom/media/VideoFrameConverter.h
--- a/dom/media/VideoFrameConverter.h
+++ b/dom/media/VideoFrameConverter.h
@@ -140,19 +140,18 @@ class VideoFrameConverter {
                    aTrackEnabled ? "enabled" : "disabled"));
           mTrackEnabled = aTrackEnabled;
           if (!aTrackEnabled) {
             // After disabling we immediately send a frame as black, so it can
             // be seen quickly, even if no frames are flowing.
             if (mLastFrameQueuedForProcessing.Serial() != -2) {
               // This track has already seen a frame so we re-send the last one
               // queued as black.
-              FrameToProcess f = mLastFrameQueuedForProcessing;
-              f.mTime = TimeStamp::Now();
-              ProcessVideoFrame(f);
+              QueueForProcessing(nullptr, TimeStamp::Now(),
+                                 mLastFrameQueuedForProcessing.mSize, true);
             } else {
               // This track has not yet seen any frame. We make one up.
               QueueForProcessing(nullptr, TimeStamp::Now(),
                                  gfx::IntSize(640, 480), true);
             }
           }
         }));
     MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv));