Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable20.1] Fix infinite loop when the constraints can not be decreased #6240

Merged
merged 2 commits into from
Sep 17, 2021

Conversation

backportbot-nextcloud[bot]
Copy link

backport of #6101

The previous minimum frame rate was wrongly got from the maximum frame
rate, so when the minimum frame rate was compared after decreasing it it
was always seen as changed. Due to this the constraints will be applied
again even if they did not actually change due to having reached the
minimum capped value, which would end in an infinite loop if the
constraints could not be applied and the minimum frame rate was (tried
to be) decreased again.

However, note that the scenario above was unlikely to happen in the real
world, as the browsers would likely accept the minimum capped value for
the frame rate of 1. The problem would occur if the stream did not come
from a device (even virtual ones) but from an HTML canvas or something
similar that does not allow to change the constraints.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The minimum value of the constraints was wrongly capped using "min"
instead of "max", so in practice the first time that the value was
decreased it was already set to the minimum capped value. Moreover, if
the value could not be set the minimum value could be decreased in the
next iteration even below the capped value.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants