[Freeswitch-svn] [commit] r5198 - freeswitch/trunk/src/mod/formats/mod_shout
Freeswitch SVN
anthm at freeswitch.org
Thu May 17 12:33:45 EDT 2007
Author: anthm
Date: Thu May 17 12:33:45 2007
New Revision: 5198
Modified:
freeswitch/trunk/src/mod/formats/mod_shout/layer3.c
Log:
maybe fix the stupid bug in the mp3 decoder code
Modified: freeswitch/trunk/src/mod/formats/mod_shout/layer3.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_shout/layer3.c (original)
+++ freeswitch/trunk/src/mod/formats/mod_shout/layer3.c Thu May 17 12:33:45 2007
@@ -826,9 +826,23 @@
int x, y;
if (!mc) {
+ unsigned sanity;
mc = *m++;
- v = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift];
- cb = *m++;
+ if ((unsigned)*scf < 100 && (unsigned)*pretab < 100) {
+ sanity = (((*scf++) + (*pretab++)) << shift);
+
+ //v = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift];
+ if (sanity < 100) {
+ v = gr_info->pow2gain[sanity];
+ cb = *m++;
+ } else {
+ return 1;
+ }
+
+ } else {
+ return 1;
+ }
+
}
{
register short *val = h->table;
More information about the Freeswitch-svn
mailing list