зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1181981: [MSE] Force TrackId for MSE tracks. r=gerald
YouTube sets the track ID at 1 for both audio and video tracks. Attempting to use mozCaptureStream would cause an assert as it always expect tracks to have a different track Id.
This commit is contained in:
Родитель
e79e352fb9
Коммит
f501a23d19
|
@ -936,6 +936,7 @@ TrackBuffersManager::OnDemuxerInitDone(nsresult)
|
|||
mVideoTracks.mDemuxer = mInputDemuxer->GetTrackDemuxer(TrackInfo::kVideoTrack, 0);
|
||||
MOZ_ASSERT(mVideoTracks.mDemuxer);
|
||||
info.mVideo = *mVideoTracks.mDemuxer->GetInfo()->GetAsVideoInfo();
|
||||
info.mVideo.mTrackId = 2;
|
||||
}
|
||||
|
||||
uint32_t numAudios = mInputDemuxer->GetNumberTracks(TrackInfo::kAudioTrack);
|
||||
|
@ -944,6 +945,7 @@ TrackBuffersManager::OnDemuxerInitDone(nsresult)
|
|||
mAudioTracks.mDemuxer = mInputDemuxer->GetTrackDemuxer(TrackInfo::kAudioTrack, 0);
|
||||
MOZ_ASSERT(mAudioTracks.mDemuxer);
|
||||
info.mAudio = *mAudioTracks.mDemuxer->GetInfo()->GetAsAudioInfo();
|
||||
info.mAudio.mTrackId = 1;
|
||||
}
|
||||
|
||||
int64_t videoDuration = numVideos ? info.mVideo.mDuration : 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче