Bug 968144 - Stop sending frame when camera stopping. r=jesup

This commit is contained in:
Alfredo Yang 2014-02-06 10:12:07 -05:00
parent 776fccc3e4
commit 28f4833f63

View File

@ -602,6 +602,9 @@ MediaEngineWebRTCVideoSource::HandleEvent(const nsAString& error) {
void
MediaEngineWebRTCVideoSource::OnNewFrame(const gfxIntSize& aIntrinsicSize, layers::Image* aImage) {
MonitorAutoLock enter(mMonitor);
if (mState == kStopped) {
return;
}
mImage = aImage;
if (mWidth != aIntrinsicSize.width || mHeight != aIntrinsicSize.height) {
mWidth = aIntrinsicSize.width;