Bug 1434946 - Report resolution change in settings already on first frame. r=jib

MozReview-Commit-ID: IzhdiHgVKOc

--HG--
extra : rebase_source : 085308eb966554ed71fb6b758cd59132b43d6ceb
This commit is contained in:
Andreas Pehrson 2018-02-01 16:58:35 +01:00
Родитель 422d32be88
Коммит f52aa5b27e
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -44,6 +44,8 @@ MediaEngineRemoteVideoSource::MediaEngineRemoteVideoSource(
, mSettings(MakeAndAddRef<media::Refcountable<MediaTrackSettings>>())
{
MOZ_ASSERT(aMediaSource != MediaSourceEnum::Other);
mSettings->mWidth.Construct(0);
mSettings->mHeight.Construct(0);
Init();
}
@ -537,7 +539,8 @@ MediaEngineRemoteVideoSource::DeliverFrame(uint8_t* aBuffer,
{
MutexAutoLock lock(mMutex);
// implicitly releases last image
sizeChanged = mImage && image && mImage->GetSize() != image->GetSize();
sizeChanged = (!mImage && image) ||
(mImage && image && mImage->GetSize() != image->GetSize());
mImage = image.forget();
mImageSize = mImage->GetSize();
}