browser(firefox): pass actual frame duration to the codec (#3101)

#1158
This commit is contained in:
Yury Semikhatsky 2020-07-22 23:27:49 -07:00 committed by GitHub
parent b271624fcb
commit 3d37e4586e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View file

@ -1,2 +1,2 @@
1137
Changed: yurys@chromium.org Tue Jul 21 09:57:24 PDT 2020
1138
Changed: yurys@chromium.org Wed Jul 22 18:07:07 PDT 2020

View file

@ -201,10 +201,7 @@ public:
m_encoderQueue->Dispatch(NS_NewRunnableFunction("VPXCodec::encodeFrameAsync", [this, frame = std::move(frame)] {
memset(m_imageBuffer.get(), 128, m_imageBufferSize);
frame->convertToVpxImage(m_image.get());
// TODO: figure out why passing duration to the codec results in much
// worse visual quality and makes video stutter.
for (int i = 0; i < frame->duration(); i++)
encodeFrame(m_image.get(), 1);
encodeFrame(m_image.get(), frame->duration());
}));
}