Bug 1092025 - Hold the lock for the entire duration of MediaSourceReader::ReadMetaData. r=karlt

This commit is contained in:
Bobby Holley 2014-12-21 23:14:59 -08:00
parent 47671649c2
commit 5e16905d15

View File

@ -723,14 +723,13 @@ MediaSourceReader::GetBuffered(dom::TimeRanges* aBuffered)
nsresult
MediaSourceReader::ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags)
{
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
MSE_DEBUG("MediaSourceReader(%p)::ReadMetadata tracks=%u/%u audio=%p video=%p",
this, mEssentialTrackBuffers.Length(), mTrackBuffers.Length(),
mAudioTrack.get(), mVideoTrack.get());
{
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
mEssentialTrackBuffers.Clear();
}
mEssentialTrackBuffers.Clear();
if (!mAudioTrack && !mVideoTrack) {
MSE_DEBUG("MediaSourceReader(%p)::ReadMetadata missing track: mAudioTrack=%p mVideoTrack=%p",
this, mAudioTrack.get(), mVideoTrack.get());