Cancel the starvation callback when MediaSourcePlayer::Release() gets called.
If we don't cancel the starvation callback, ProcessPendingEvents will get executed later when the callback fires. Because we use a BarrierClosure in ProcessPendingEvents() and the count is 0 as both audio and video decoders are released, OnPrefetchDone() will be immediately called. And this will cause ProcessPendingEvents() to get called again and again, thus crashing chrome. An alternative to this fix is to check count before creating the barrier. Logically starvation callback should not get called after Release(). BUG=285573 Review URL: https://chromiumcodereview.appspot.com/23672025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221509 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment