mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-31 21:21:08 +00:00
Bug 1064118 - Drop MediaSourceReader sub-reader refs in a safer order. r=cajbir
This commit is contained in:
parent
424406e1b8
commit
5c88bf3ea3
@ -209,28 +209,28 @@ void
|
|||||||
MediaSourceReader::Shutdown()
|
MediaSourceReader::Shutdown()
|
||||||
{
|
{
|
||||||
MediaDecoderReader::Shutdown();
|
MediaDecoderReader::Shutdown();
|
||||||
for (uint32_t i = 0; i < mTrackBuffers.Length(); ++i) {
|
|
||||||
mTrackBuffers[i]->Shutdown();
|
|
||||||
}
|
|
||||||
mTrackBuffers.Clear();
|
|
||||||
mAudioTrack = nullptr;
|
mAudioTrack = nullptr;
|
||||||
mAudioReader = nullptr;
|
mAudioReader = nullptr;
|
||||||
mVideoTrack = nullptr;
|
mVideoTrack = nullptr;
|
||||||
mVideoReader = nullptr;
|
mVideoReader = nullptr;
|
||||||
|
for (uint32_t i = 0; i < mTrackBuffers.Length(); ++i) {
|
||||||
|
mTrackBuffers[i]->Shutdown();
|
||||||
|
}
|
||||||
|
mTrackBuffers.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MediaSourceReader::BreakCycles()
|
MediaSourceReader::BreakCycles()
|
||||||
{
|
{
|
||||||
MediaDecoderReader::BreakCycles();
|
MediaDecoderReader::BreakCycles();
|
||||||
for (uint32_t i = 0; i < mTrackBuffers.Length(); ++i) {
|
|
||||||
mTrackBuffers[i]->BreakCycles();
|
|
||||||
}
|
|
||||||
mTrackBuffers.Clear();
|
|
||||||
mAudioTrack = nullptr;
|
mAudioTrack = nullptr;
|
||||||
mAudioReader = nullptr;
|
mAudioReader = nullptr;
|
||||||
mVideoTrack = nullptr;
|
mVideoTrack = nullptr;
|
||||||
mVideoReader = nullptr;
|
mVideoReader = nullptr;
|
||||||
|
for (uint32_t i = 0; i < mTrackBuffers.Length(); ++i) {
|
||||||
|
mTrackBuffers[i]->BreakCycles();
|
||||||
|
}
|
||||||
|
mTrackBuffers.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
Loading…
Reference in New Issue
Block a user