зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1120086: Re-open SourceBuffer after call to appendBuffer if in ended state. r=cajbir
--HG-- extra : rebase_source : 56923ceb5f28dadeda981b8365f277320afc72ba
This commit is contained in:
Родитель
510550aff7
Коммит
52d3bbb9ae
|
@ -233,7 +233,7 @@ SourceBuffer::Ended()
|
|||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(IsAttached());
|
||||
MSE_DEBUG("SourceBuffer(%p)::Ended", this);
|
||||
mTrackBuffer->DiscardDecoder();
|
||||
mTrackBuffer->EndCurrentDecoder();
|
||||
}
|
||||
|
||||
SourceBuffer::SourceBuffer(MediaSource* aMediaSource, const nsACString& aType)
|
||||
|
|
|
@ -205,6 +205,7 @@ SourceBufferResource::AppendData(const uint8_t* aData, uint32_t aLength)
|
|||
SBR_DEBUG("SourceBufferResource(%p)::AppendData(aData=%p, aLength=%u)", this, aData, aLength);
|
||||
ReentrantMonitorAutoEnter mon(mMonitor);
|
||||
mInputBuffer.AppendItem(aData, aLength);
|
||||
mEnded = false;
|
||||
mon.NotifyAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -548,6 +548,15 @@ TrackBuffer::DiscardDecoder()
|
|||
mCurrentDecoder = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
TrackBuffer::EndCurrentDecoder()
|
||||
{
|
||||
ReentrantMonitorAutoEnter mon(mParentDecoder->GetReentrantMonitor());
|
||||
if (mCurrentDecoder) {
|
||||
mCurrentDecoder->GetResource()->Ended();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
TrackBuffer::Detach()
|
||||
{
|
||||
|
|
|
@ -61,6 +61,8 @@ public:
|
|||
// Mark the current decoder's resource as ended, clear mCurrentDecoder and
|
||||
// reset mLast{Start,End}Timestamp.
|
||||
void DiscardDecoder();
|
||||
// Mark the current decoder's resource as ended.
|
||||
void EndCurrentDecoder();
|
||||
|
||||
void Detach();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче