Bug 1204413 - Make MediaDecoder::IsTransportSeekable run on the main thread. r=kinetik.

This commit is contained in:
JW Wang 2015-09-16 10:44:35 +08:00
parent cd2b3b0288
commit 7c0af0a092
2 changed files with 2 additions and 2 deletions

View File

@ -1117,7 +1117,7 @@ void MediaDecoder::SetMediaSeekable(bool aMediaSeekable) {
bool
MediaDecoder::IsTransportSeekable()
{
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
MOZ_ASSERT(NS_IsMainThread());
return GetResource()->IsTransportSeekable();
}

View File

@ -2067,7 +2067,7 @@ MediaDecoderStateMachine::FinishDecodeFirstFrame()
DECODER_LOG("Media duration %lld, "
"transportSeekable=%d, mediaSeekable=%d",
Duration().ToMicroseconds(), mDecoder->IsTransportSeekable(), mDecoder->IsMediaSeekable());
Duration().ToMicroseconds(), mResource->IsTransportSeekable(), mDecoder->IsMediaSeekable());
if (HasAudio() && !HasVideo() && !mSentFirstFrameLoadedEvent) {
// We're playing audio only. We don't need to worry about slow video