зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1366706 - accepts video frames with negative timestamp but non-zero size. r=jya
MozReview-Commit-ID: 5QqzOesIynN --HG-- extra : rebase_source : 7bcebe28e90189a79f554e8fc27d77d7db52d924
This commit is contained in:
Родитель
e4b23e526a
Коммит
f6631d92ad
|
@ -112,6 +112,9 @@ public:
|
|||
int32_t offset;
|
||||
ok &= NS_SUCCEEDED(info->Offset(&offset));
|
||||
|
||||
int32_t size;
|
||||
ok &= NS_SUCCEEDED(info->Size(&size));
|
||||
|
||||
int64_t presentationTimeUs;
|
||||
ok &= NS_SUCCEEDED(info->PresentationTimeUs(&presentationTimeUs));
|
||||
|
||||
|
@ -130,7 +133,7 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
if (ok && presentationTimeUs >= 0) {
|
||||
if (ok && (size > 0 || presentationTimeUs >= 0)) {
|
||||
RefPtr<layers::Image> img = new SurfaceTextureImage(
|
||||
mDecoder->mSurfaceHandle, inputInfo.mImageSize, false /* NOT continuous */,
|
||||
gl::OriginPos::BottomLeft);
|
||||
|
|
Загрузка…
Ссылка в новой задаче