tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9092 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
22aca7224f
commit
c1ac14f1e6
|
@ -464,7 +464,7 @@ switch_status_t sofia_glue_ext_address_lookup(sofia_profile_t *profile, private_
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! No IP returned\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! No IP returned\n");
|
||||||
return SWITCH_STATUS_FALSE;
|
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 (tech_pvt) {
|
||||||
if (myport == *port && !strcmp(*ip, tech_pvt->profile->rtpip)) {
|
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);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Not Required ip and port match. [%s]:[%d]\n", *ip, *port);
|
||||||
|
|
|
@ -85,9 +85,14 @@ static inline void free_context(shout_context_t *context)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context->fp) {
|
if (context->fp) {
|
||||||
unsigned char mp3buffer[1024];
|
unsigned char mp3buffer[8192];
|
||||||
|
int16_t blank[1024] = {0}, *r = NULL;
|
||||||
int len;
|
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) {
|
while ((len = lame_encode_flush(context->gfp, mp3buffer, sizeof(mp3buffer))) > 0) {
|
||||||
ret = fwrite(mp3buffer, 1, len, context->fp);
|
ret = fwrite(mp3buffer, 1, len, context->fp);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
|
Loading…
Reference in New Issue