b=1080958 end current SourceBufferResource before Shutdown of TrackBuffer::mTaskQueue r=kinetik

--HG--
extra : rebase_source : fa2c7ca8138b666508f09badb907b4c420b8f9f8
This commit is contained in:
Karl Tomlinson 2014-10-10 17:13:10 +13:00
Родитель e2c48838cb
Коммит c74ff53d89
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -75,6 +75,11 @@ private:
void
TrackBuffer::Shutdown()
{
// End the SourceBufferResource associated with mCurrentDecoder, which will
// unblock any decoder initialization in ReadMetadata().
DiscardDecoder();
// Finish any decoder initialization, which may add to mInitializedDecoders.
// Shutdown waits for any pending events, which may require the monitor,
// so we must not hold the monitor during this call.
mParentDecoder->GetReentrantMonitor().AssertNotCurrentThreadIn();
@ -82,7 +87,6 @@ TrackBuffer::Shutdown()
mTaskQueue = nullptr;
ReentrantMonitorAutoEnter mon(mParentDecoder->GetReentrantMonitor());
DiscardDecoder();
for (uint32_t i = 0; i < mDecoders.Length(); ++i) {
mDecoders[i]->GetReader()->Shutdown();
}