Bug 752661 - Make ReadMetadata() fail when there are no active Ogg streams, r=kinetik

This commit is contained in:
Timothy B. Terriberry 2012-06-02 06:29:44 -07:00
parent 36e6d15c67
commit d3be27c800

View File

@ -314,7 +314,7 @@ nsresult nsOggReader::ReadMetadata(nsVideoInfo* aInfo)
}
}
{
if (HasAudio() || HasVideo()) {
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
MediaResource* resource = mDecoder->GetResource();
@ -338,6 +338,8 @@ nsresult nsOggReader::ReadMetadata(nsVideoInfo* aInfo)
LOG(PR_LOG_DEBUG, ("Got Ogg duration from seeking to end %lld", endTime));
}
}
} else {
return NS_ERROR_FAILURE;
}
*aInfo = mInfo;