codec tweak

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1957 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2006-07-18 18:34:42 +00:00
1 parent 629ee71e8f
commit aee6cc27e1
5 files changed
+51 -30

No files matched your search

+6 -2
View File
@@ -1099,8 +1099,12 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
break;
}
bytes = tech_pvt->read_codec.implementation->encoded_bytes_per_frame;
frames = (int) (tech_pvt->read_frame.datalen / bytes);
if (tech_pvt->read_codec.implementation->encoded_bytes_per_frame) {
bytes = tech_pvt->read_codec.implementation->encoded_bytes_per_frame;
frames = (int) (tech_pvt->read_frame.datalen / bytes);
} else {
frames = 1;
}
tech_pvt->read_frame.samples = frames * tech_pvt->read_codec.implementation->samples_per_frame;