[Freeswitch-svn] [commit] r5350 - freeswitch/trunk/src
Freeswitch SVN
anthm at freeswitch.org
Wed Jun 13 17:51:18 EDT 2007
Author: anthm
Date: Wed Jun 13 17:51:18 2007
New Revision: 5350
Modified:
freeswitch/trunk/src/switch_core_codec.c
freeswitch/trunk/src/switch_core_io.c
Log:
tweak
Modified: freeswitch/trunk/src/switch_core_codec.c
==============================================================================
--- freeswitch/trunk/src/switch_core_codec.c (original)
+++ freeswitch/trunk/src/switch_core_codec.c Wed Jun 13 17:51:18 2007
@@ -48,6 +48,9 @@
}
session->read_codec = codec;
+ session->raw_read_frame.codec = session->read_codec;
+ session->raw_write_frame.codec = session->read_codec;
+
return SWITCH_STATUS_SUCCESS;
}
Modified: freeswitch/trunk/src/switch_core_io.c
==============================================================================
--- freeswitch/trunk/src/switch_core_io.c (original)
+++ freeswitch/trunk/src/switch_core_io.c Wed Jun 13 17:51:18 2007
@@ -300,6 +300,7 @@
enc_frame = &session->raw_read_frame;
}
session->enc_read_frame.datalen = session->enc_read_frame.buflen;
+
assert(session->read_codec != NULL);
assert(enc_frame != NULL);
assert(enc_frame->data != NULL);
@@ -316,7 +317,6 @@
case SWITCH_STATUS_RESAMPLE:
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "fixme 1\n");
case SWITCH_STATUS_SUCCESS:
- session->enc_read_frame.codec = session->read_codec;
session->enc_read_frame.samples = session->read_codec->implementation->bytes_per_frame / sizeof(int16_t);
session->enc_read_frame.timestamp = read_frame->timestamp;
session->enc_read_frame.rate = read_frame->rate;
@@ -327,7 +327,6 @@
*frame = &session->enc_read_frame;
break;
case SWITCH_STATUS_NOOP:
- session->raw_read_frame.codec = session->read_codec;
session->raw_read_frame.samples = enc_frame->codec->implementation->samples_per_frame;
session->raw_read_frame.timestamp = read_frame->timestamp;
session->raw_read_frame.payload = enc_frame->codec->implementation->ianacode;
More information about the Freeswitch-svn
mailing list