[Freeswitch-svn] [commit] r6034 - freeswitch/trunk/src/mod/languages/mod_spidermonkey

Freeswitch SVN anthm at freeswitch.org
Tue Oct 23 14:25:59 EDT 2007


Author: anthm
Date: Tue Oct 23 14:25:58 2007
New Revision: 6034

Modified:
   freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c

Log:
fix MODLANG-43

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	Tue Oct 23 14:25:58 2007
@@ -1097,14 +1097,14 @@
 			}
 			return SWITCH_STATUS_SUCCESS;
 		} else if (!strcasecmp(ret, "restart")) {
-			unsigned int pos = 0;
+			uint32_t pos = 0;
 			fh->speed = 0;
 			switch_core_file_seek(fh, &pos, 0, SEEK_SET);
 			return SWITCH_STATUS_SUCCESS;
 		} else if (!strncasecmp(ret, "seek", 4)) {
 			switch_codec_t *codec;
-			unsigned int samps = 0;
-			unsigned int pos = 0;
+			uint32_t samps = 0;
+			uint32_t pos = 0;
 			char *p;
 			codec = switch_core_session_get_read_codec(jss->session);
 
@@ -1119,7 +1119,7 @@
 						samps = step * (codec->implementation->actual_samples_per_second / 1000);
 						switch_core_file_seek(fh, &pos, samps, SEEK_CUR);
 					} else {
-						samps = step * (codec->implementation->actual_samples_per_second / 1000);
+						samps = abs(step) * (codec->implementation->actual_samples_per_second / 1000);
 						switch_core_file_seek(fh, &pos, fh->pos - samps, SEEK_SET);
 					}
 				} else {



More information about the Freeswitch-svn mailing list