mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-07 22:02:12 +08:00
video: fix screen sharing on macOS
Because media encoder flush() involves encoding we should change initialized flag after calling flush(), otherwise, it could lead to new stream initializing. https://git.jami.net/savoirfairelinux/jami-client-macos/-/issues/299 Change-Id: I88d5648a6f252bd78776f505f891f09a4e5b12e1
This commit is contained in:

committed by
Kateryna Kostiuk

parent
9c9d11e410
commit
41eab75d73
@ -1340,13 +1340,12 @@ MediaEncoder::getScaledSWFrame(const VideoFrame& input)
|
||||
void
|
||||
MediaEncoder::resetStreams(int width, int height)
|
||||
{
|
||||
// Only called by VideoSender!
|
||||
initialized_ = false;
|
||||
videoOpts_.width = width;
|
||||
videoOpts_.height = height;
|
||||
|
||||
try {
|
||||
flush();
|
||||
initialized_ = false;
|
||||
if (outputCtx_) {
|
||||
for (auto encoderCtx : encoders_) {
|
||||
if (encoderCtx) {
|
||||
|
Reference in New Issue
Block a user