[asterisk-commits] apps/app echo: Only relay a single video source change frame (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Nov 16 14:59:50 CST 2016


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4435 )

Change subject: apps/app_echo: Only relay a single video source change frame
......................................................................


apps/app_echo: Only relay a single video source change frame

In 9785e8d0, app_echo was updated to relay video source updates to the
channel for the purposes of displaying video in WebRTC tests.
Unfortunately, this can cause a Kafkaesque nightmare if two or more
Local channels are in a bridge together where their ends are in
app_echo. When this situation occurs, a video update sent into app_echo
will cause the video update to be relayed to the other Local channels,
causing another round of video updates, etc. In not much time at all,
the channel length queues will be overwhelmed, channel alert pipes will
fail, and all hell will break loose as Asterisk merrily continues to
throw more video update requests onto the channels.

This patch updates app_echo to *only* relay a single video update. Once
a video update has been made, all further video updates are dropped.
This meets the intended purpose of the original patch: if we get a video
update and we're in app_echo, go ahead and ask the sender to update
themselves. However, once we've got that video stream sync'd up, don't
keep spamming the world.

Change-Id: I9210780b08d4c17ddb38599d1c64453adfc34f74
---
M apps/app_echo.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/apps/app_echo.c b/apps/app_echo.c
index 0f4c94b..e50173a 100644
--- a/apps/app_echo.c
+++ b/apps/app_echo.c
@@ -66,7 +66,8 @@
 		f->delivery.tv_sec = 0;
 		f->delivery.tv_usec = 0;
 		if (f->frametype == AST_FRAME_CONTROL
-			&& f->subclass.integer == AST_CONTROL_VIDUPDATE) {
+			&& f->subclass.integer == AST_CONTROL_VIDUPDATE
+			&& !fir_sent) {
 			if (ast_write(chan, f) < 0) {
 				ast_frfree(f);
 				goto end;

-- 
To view, visit https://gerrit.asterisk.org/4435
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9210780b08d4c17ddb38599d1c64453adfc34f74
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>



More information about the asterisk-commits mailing list