[Freeswitch-svn] [commit] r9092 - in freeswitch/trunk/src/mod: endpoints/mod_sofia formats/mod_shout

Freeswitch SVN anthm at freeswitch.org
Fri Jul 18 13:33:31 EDT 2008


Author: anthm
Date: Fri Jul 18 13:33:30 2008
New Revision: 9092

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
   freeswitch/trunk/src/mod/formats/mod_shout/mod_shout.c

Log:
tweak

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	Fri Jul 18 13:33:30 2008
@@ -464,7 +464,7 @@
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! No IP returned\n");
 			return SWITCH_STATUS_FALSE;
 		}
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Success [%s]:[%d] [%s][%d]\n", *ip, *port, tech_pvt->profile->rtpip, myport);
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Success [%s]:[%d]\n", *ip, *port);
 		if (tech_pvt) {
 			if (myport == *port && !strcmp(*ip, tech_pvt->profile->rtpip)) {
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Not Required ip and port match. [%s]:[%d]\n", *ip, *port);

Modified: freeswitch/trunk/src/mod/formats/mod_shout/mod_shout.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_shout/mod_shout.c	(original)
+++ freeswitch/trunk/src/mod/formats/mod_shout/mod_shout.c	Fri Jul 18 13:33:30 2008
@@ -85,16 +85,21 @@
 		}
 
 		if (context->fp) {
-			unsigned char mp3buffer[1024];
+			unsigned char mp3buffer[8192];
+			int16_t blank[1024] = {0}, *r = NULL;
 			int len;
 
+			if ((len = lame_encode_buffer(context->gfp, blank, r, sizeof(blank) / 2, mp3buffer, sizeof(mp3buffer)))) {
+				ret = fwrite(mp3buffer, 1, len, context->fp);
+			}
+			
 			while ((len = lame_encode_flush(context->gfp, mp3buffer, sizeof(mp3buffer))) > 0) {
 				ret = fwrite(mp3buffer, 1, len, context->fp);
 				if (ret < 0) {
 					break;
 				}
 			}
-
+			
 			lame_mp3_tags_fid(context->gfp, context->fp);
 
 			fclose(context->fp);



More information about the Freeswitch-svn mailing list