Bug 984816: RTSP play/pause deadlock issue. 1. Release the monitor when access mReader. 2. Reverse the order in RtspOmxReader::SetIdle(). r=cpearce

This commit is contained in:
Benjamin Chen 2014-03-31 10:18:01 +08:00
parent e1ab56813a
commit 9893d68d5e
2 changed files with 7 additions and 4 deletions

View File

@ -1505,7 +1505,10 @@ MediaDecoderStateMachine::EnsureActive()
return;
}
mIsReaderIdle = false;
SetReaderActive();
{
ReentrantMonitorAutoExit exitMon(mDecoder->GetReentrantMonitor());
SetReaderActive();
}
}
void

View File

@ -312,6 +312,9 @@ RtspOmxReader::ReadMetadata(MediaInfo* aInfo,
}
void RtspOmxReader::SetIdle() {
// Call parent class to set OMXCodec idle.
MediaOmxReader::SetIdle();
// Need to pause RTSP streaming OMXCodec decoding.
if (mRtspResource) {
nsIStreamingProtocolController* controller =
@ -320,9 +323,6 @@ void RtspOmxReader::SetIdle() {
controller->Pause();
}
}
// Call parent class to set OMXCodec idle.
MediaOmxReader::SetIdle();
}
void RtspOmxReader::SetActive() {