<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18805">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_confbridge: Always set minimum video update interval.<br><br>Currently, if multiple video-enabled ConfBridges are<br>conferenced together, we immediately get into a scenario<br>where an infinite sequence of video updates fills up<br>the taskprocessor queue and causes memory consumption<br>to climb unabated until Asterisk is killed. This is due<br>to the core bridging mechanism that provides video updates<br>(softmix_bridge_write_control in bridge_softmix.c)<br>continously updating all the channels in the bridge with<br>video updates.<br><br>The logic to do so in the core is that the video updates<br>should be provided if the video_update_discard property<br>for the bridge is 0, or if enough time has elapsed since<br>the last video update. Thus, we already have a safeguard<br>built in to ensure the scenario described above does not<br>happen. Currently, however, this safeguard is not being<br>adequately ensured.<br><br>In app_confbridge, the video_update_discard property<br>defaults to 2000, which is a healthy value that should<br>completely prevent this issue. However, this value is<br>only set onto the bridge in the SFU video mode. This<br>leaves video modes such as follow_talker completely<br>vulnerable, since video_update_discard will actually<br>be 0, since the default or set value was never applied.<br>As a result, the core bridging mechanism will always<br>try to provide video updates regardless of when the last<br>one was sent.<br><br>To prevent this issue from happening, we now always<br>set the video_update_discard property on the bridge<br>with the value from the bridge profile. The app_confbridge<br>defaults will thus ensure that infinite video updates<br>no longer happen in any video mode.<br><br>ASTERISK-29907 #close<br><br>Change-Id: I4accb2536ac62797950468e9930f12ef7dd486b2<br>---<br>M apps/app_confbridge.c<br>1 file changed, 3 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/05/18805/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c</span><br><span>index 492649c..1733556 100644</span><br><span>--- a/apps/app_confbridge.c</span><br><span>+++ b/apps/app_confbridge.c</span><br><span>@@ -1804,7 +1804,6 @@</span><br><span>                    ast_bridge_set_talker_src_video_mode(conference->bridge);</span><br><span>                 } else if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_VIDEO_SRC_SFU)) {</span><br><span>                         ast_bridge_set_sfu_video_mode(conference->bridge);</span><br><span style="color: hsl(0, 100%, 40%);">-                   ast_bridge_set_video_update_discard(conference->bridge, conference->b_profile.video_update_discard);</span><br><span>                   ast_bridge_set_remb_send_interval(conference->bridge, conference->b_profile.remb_send_interval);</span><br><span>                       if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE)) {</span><br><span>                                ast_brige_set_remb_behavior(conference->bridge, AST_BRIDGE_VIDEO_SFU_REMB_AVERAGE);</span><br><span>@@ -1824,6 +1823,9 @@</span><br><span>                       }</span><br><span>            }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+         /* Always set the minimum interval between video updates, to avoid infinite video updates. */</span><br><span style="color: hsl(120, 100%, 40%);">+         ast_bridge_set_video_update_discard(conference->bridge, conference->b_profile.video_update_discard);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>                 if (ast_test_flag(&conference->b_profile, BRIDGE_OPT_ENABLE_EVENTS)) {</span><br><span>                        ast_bridge_set_send_sdp_label(conference->bridge, 1);</span><br><span>             }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18805">change 18805</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/18805"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I4accb2536ac62797950468e9930f12ef7dd486b2 </div>
<div style="display:none"> Gerrit-Change-Number: 18805 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>