[Freeswitch-svn] [commit] r13018 - freeswitch/trunk/src/mod/endpoints/mod_loopback

FreeSWITCH SVN anthm at freeswitch.org
Tue Apr 14 10:29:38 PDT 2009


Author: anthm
Date: Tue Apr 14 12:29:38 2009
New Revision: 13018

Log:
flush queued frames on audio sync event

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c	Tue Apr 14 12:29:38 2009
@@ -688,6 +688,25 @@
 	default:
 		break;
 	}
+
+	switch (msg->message_id) {
+	case SWITCH_MESSAGE_INDICATE_BRIDGE:
+	case SWITCH_MESSAGE_INDICATE_UNBRIDGE:
+	case SWITCH_MESSAGE_INDICATE_AUDIO_SYNC:
+		{
+			void *pop;
+
+			while (switch_queue_trypop(tech_pvt->frame_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
+				switch_frame_t *frame = (switch_frame_t *) pop;
+				switch_frame_free(&frame);
+			}
+		}
+		break;
+    default:
+        break;
+    }
+	
+
 	return SWITCH_STATUS_SUCCESS;
 }
 



More information about the Freeswitch-svn mailing list