]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix nested brackets
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 7 Nov 2007 02:14:57 +0000 (02:14 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 7 Nov 2007 02:14:57 +0000 (02:14 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6172 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/formats/mod_shout/mod_shout.c
src/switch_channel.c

index a0dc429585c7fcd81c6a6f8b85f96277063bc3ef..9cefbb9bc97424d126b868155484bf3018cd390a 100644 (file)
@@ -37,9 +37,9 @@
 #include <lame.h>
 #include <curl/curl.h>
 
-#define OUTSCALE 8192
-#define MP3_SCACHE 16384
-#define MP3_DCACHE 8192
+#define OUTSCALE 8192 * 2
+#define MP3_SCACHE 16384 * 2
+#define MP3_DCACHE 8192 *2
 
 SWITCH_MODULE_LOAD_FUNCTION(mod_shout_load);
 SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_shout_shutdown);
index 429ac735d24651d2dd5a9a96052621b1634bf1a9..b6d9be4bdfbca0e2bf8c6ee80a434f51e4100c5e 100644 (file)
@@ -1355,6 +1355,15 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel
                                                *e++ = '\0';
                                                break;
                                        }
+
+                                       if (br > 0) {
+                                               if (e != s && *e == '{') {
+                                                       br++;
+                                               } else if (br > 1 && *e == '}') {
+                                                       br--;
+                                               }
+                                       }
+                                       
                                        e++;
                                }
                                p = e;
@@ -1380,7 +1389,7 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel
 
                                        if (stream.data) {
                                                char *expanded = NULL;
-                                               
+
                                                if ((expanded = switch_channel_expand_variables(channel, vval)) == vval) {
                                                        expanded = NULL;
                                                } else {