[Freeswitch-trunk] [commit] r13890 - freeswitch/trunk/src/mod/formats/mod_sndfile
FreeSWITCH SVN
brian at freeswitch.org
Mon Jun 22 07:35:10 PDT 2009
Author: brian
Date: Mon Jun 22 09:35:09 2009
New Revision: 13890
Log:
mod_sndfile: fix off by one error (MODFORM-29)
Modified:
freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c
Modified: freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c (original)
+++ freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c Mon Jun 22 09:35:09 2009
@@ -179,7 +179,7 @@
/* Try to find the file at the highest rate possible if we can't find one that matches the exact rate.
If we don't find any, we will default back to the original file name.
*/
- for (i = 3; i > 0; i--) {
+ for (i = 3; i >= 0; i--) {
switch_snprintf(last, alt_len - (last - alt_path), "%d%s%s", rates[i], SWITCH_PATH_SEPARATOR, ldup);
if ((context->handle = sf_open(alt_path, mode, &context->sfinfo))) {
path = alt_path;
More information about the Freeswitch-trunk
mailing list