Explicitly stop frame delivery in FakePeriodicVideoCapturer.
There's currently a race while deleting an instance of the
class if frame delivery hasn't been explicitly stopped.
Bug: webrtc:8894
Change-Id: I1c60e6e3f9a3e51b16a21a610d21e33fcf58cc0e
Tbr: kthelgason@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/53980
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22039}
diff --git a/pc/test/fakeperiodicvideocapturer.h b/pc/test/fakeperiodicvideocapturer.h
index e236164..e9eb475 100644
--- a/pc/test/fakeperiodicvideocapturer.h
+++ b/pc/test/fakeperiodicvideocapturer.h
@@ -42,6 +42,7 @@
~FakePeriodicVideoCapturer() override {
RTC_DCHECK(main_thread_checker_.CalledOnValidThread());
+ StopFrameDelivery();
}
// Workaround method for tests to allow stopping frame delivery directly.