Bug 1132342: Handle race should operation be aborted while reading metadata. r=karlt

This commit is contained in:
Jean-Yves Avenard 2015-02-24 16:38:41 +11:00
parent 21a52db121
commit 4b8b909e72

View File

@ -614,6 +614,10 @@ TrackBuffer::InitializeDecoder(SourceBufferDecoder* aDecoder)
MSE_DEBUG("was shut down while reading metadata. Aborting initialization.");
return;
}
if (mCurrentDecoder != aDecoder) {
MSE_DEBUG("append was cancelled. Aborting initialization.");
return;
}
if (NS_SUCCEEDED(rv) && reader->IsWaitingOnCDMResource()) {
mWaitingDecoders.AppendElement(aDecoder);