]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_confbridge: Always set minimum video update interval.
authorNaveen Albert <asterisk@phreaknet.org>
Sat, 18 Jun 2022 12:17:50 +0000 (12:17 +0000)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Wed, 13 Jul 2022 23:04:29 +0000 (18:04 -0500)
commit2843e5678df1a4e1042b4bfab4cc6dddcb372606
tree50c1ce70214124ea7be93e784e07ec8b7006a0ed
parentd25bf55de5f3a7454c42aa9af34d1c3aa859862c
app_confbridge: Always set minimum video update interval.

Currently, if multiple video-enabled ConfBridges are
conferenced together, we immediately get into a scenario
where an infinite sequence of video updates fills up
the taskprocessor queue and causes memory consumption
to climb unabated until Asterisk is killed. This is due
to the core bridging mechanism that provides video updates
(softmix_bridge_write_control in bridge_softmix.c)
continously updating all the channels in the bridge with
video updates.

The logic to do so in the core is that the video updates
should be provided if the video_update_discard property
for the bridge is 0, or if enough time has elapsed since
the last video update. Thus, we already have a safeguard
built in to ensure the scenario described above does not
happen. Currently, however, this safeguard is not being
adequately ensured.

In app_confbridge, the video_update_discard property
defaults to 2000, which is a healthy value that should
completely prevent this issue. However, this value is
only set onto the bridge in the SFU video mode. This
leaves video modes such as follow_talker completely
vulnerable, since video_update_discard will actually
be 0, since the default or set value was never applied.
As a result, the core bridging mechanism will always
try to provide video updates regardless of when the last
one was sent.

To prevent this issue from happening, we now always
set the video_update_discard property on the bridge
with the value from the bridge profile. The app_confbridge
defaults will thus ensure that infinite video updates
no longer happen in any video mode.

ASTERISK-29907 #close

Change-Id: I4accb2536ac62797950468e9930f12ef7dd486b2
apps/app_confbridge.c