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:
Jean-Yves Avenard 2016-02-04 10:45:08 +11:00
Родитель e79e352fb9
Коммит f501a23d19
1 изменённых файлов: 2 добавлений и 0 удалений

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

@ -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;