[asterisk-commits] oej: branch oej/teapot-1.8 r417795 - /team/oej/teapot-1.8/res/res_rtp_asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 3 03:09:08 CDT 2014


Author: oej
Date: Thu Jul  3 03:08:56 2014
New Revision: 417795

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=417795
Log:
Better to run isolation of the frame

Modified:
    team/oej/teapot-1.8/res/res_rtp_asterisk.c

Modified: team/oej/teapot-1.8/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/res/res_rtp_asterisk.c?view=diff&rev=417795&r1=417794&r2=417795
==============================================================================
--- team/oej/teapot-1.8/res/res_rtp_asterisk.c (original)
+++ team/oej/teapot-1.8/res/res_rtp_asterisk.c Thu Jul  3 03:08:56 2014
@@ -2522,15 +2522,6 @@
 		ast_log(LOG_WARNING, "RTP Read too short (%d expecting %d)\n", res, hdrlen);
 		return &ast_null_frame;
 	}
-	if (ast_test_flag(rtp, FLAG_CN_ACTIVE)) {
-		struct ast_frame *f = NULL;
-		struct ast_frame cngoff = { AST_FRAME_CONTROL, { AST_CONTROL_CNG_END, } };
-		ast_debug(2, "DEACTIVATING Comfort Noise \n");
-		ast_clear_flag(rtp, FLAG_CN_ACTIVE);
-		f = ast_frdup(&cngoff);
-		AST_LIST_INSERT_TAIL(&frames, f, frame_list);
-		f = NULL;
-	}
 
 	/* Get fields and verify this is an RTP packet */
 	seqno = ntohl(rtpheader[0]);
@@ -2625,6 +2616,15 @@
 	ssrc = ntohl(rtpheader[2]);
 
 	AST_LIST_HEAD_INIT_NOLOCK(&frames);
+
+	if (ast_test_flag(rtp, FLAG_CN_ACTIVE)) {
+		struct ast_frame *f = NULL;
+		struct ast_frame cngoff = { AST_FRAME_CONTROL, { AST_CONTROL_CNG_END, } };
+		ast_debug(2, "DEACTIVATING Comfort Noise \n");
+		ast_clear_flag(rtp, FLAG_CN_ACTIVE);
+		f = ast_frisolate(&cngoff);
+		AST_LIST_INSERT_TAIL(&frames, f, frame_list);
+	}
 	/* Force a marker bit and change SSRC if the SSRC changes */
 	if (rtp->rxssrc && rtp->rxssrc != ssrc) {
 		struct ast_frame *f, srcupdate = {




More information about the asterisk-commits mailing list