Fix occasional race in VideoCapturerTrackSource seen by memcheck bot.
The issue was that VideoCapturerTrackSource was adding a reference
to itself, causing it to not be deleted even after no external objects
reference it. The objects underneath it (threads for instance) may
then be destroyed before the object dereferences them.
BUG=webrtc:6487
Review-Url: https://codereview.webrtc.org/2717023002
Cr-Original-Commit-Position: refs/heads/master@{#16841}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: f15fb452efe5a7082dd49faceba1ff123985f258
2 files changed