Bug 1172394 - Don't remove dom::MediaTracks on chained metadata updates. r=padenot

HTMLMediaElement avoid creating new tracks in MetadataLoaded when it has already
created some, so there should be no side effect to this patch.

Differential Revision: https://phabricator.services.mozilla.com/D52037

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andreas Pehrson 2019-11-13 08:48:03 +00:00
Родитель baa9f1296f
Коммит 9112bdefc4
1 изменённых файлов: 0 добавлений и 1 удалений

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

@ -642,7 +642,6 @@ double MediaDecoder::GetCurrentTime() {
void MediaDecoder::OnMetadataUpdate(TimedMetadata&& aMetadata) {
MOZ_ASSERT(NS_IsMainThread());
AbstractThread::AutoEnter context(AbstractMainThread());
GetOwner()->RemoveMediaTracks();
MetadataLoaded(MakeUnique<MediaInfo>(*aMetadata.mInfo),
UniquePtr<MetadataTags>(std::move(aMetadata.mTags)),
MediaDecoderEventVisibility::Observable);