зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1259788 - Remove direct track listeners from TrackUnionStream before inputs are removed. r=jesup
MozReview-Commit-ID: DTHF2pHEFSt --HG-- extra : rebase_source : feddfc8ddbae33b2c97d0009b2a648ca71b33bbe
This commit is contained in:
Родитель
9f015ef1b0
Коммит
20c6e5d1e0
|
@ -58,6 +58,10 @@ TrackUnionStream::TrackUnionStream() :
|
||||||
if (mTrackMap[i].mInputPort == aPort) {
|
if (mTrackMap[i].mInputPort == aPort) {
|
||||||
STREAM_LOG(LogLevel::Debug, ("TrackUnionStream %p removing trackmap entry %d", this, i));
|
STREAM_LOG(LogLevel::Debug, ("TrackUnionStream %p removing trackmap entry %d", this, i));
|
||||||
EndTrack(i);
|
EndTrack(i);
|
||||||
|
for (auto listener : mTrackMap[i].mOwnedDirectListeners) {
|
||||||
|
// Remove listeners while the entry still exists.
|
||||||
|
RemoveDirectTrackListenerImpl(listener, mTrackMap[i].mOutputTrackID);
|
||||||
|
}
|
||||||
mTrackMap.RemoveElementAt(i);
|
mTrackMap.RemoveElementAt(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,6 +134,10 @@ TrackUnionStream::TrackUnionStream() :
|
||||||
allFinished = false;
|
allFinished = false;
|
||||||
}
|
}
|
||||||
if (!mappedTracksWithMatchingInputTracks[i]) {
|
if (!mappedTracksWithMatchingInputTracks[i]) {
|
||||||
|
for (auto listener : mTrackMap[i].mOwnedDirectListeners) {
|
||||||
|
// Remove listeners while the entry still exists.
|
||||||
|
RemoveDirectTrackListenerImpl(listener, mTrackMap[i].mOutputTrackID);
|
||||||
|
}
|
||||||
mTrackMap.RemoveElementAt(i);
|
mTrackMap.RemoveElementAt(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче