]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5216 seems like invalid codec lets try this v1.3.17-final
authorAnthony Minessale <anthm@freeswitch.org>
Sat, 30 Mar 2013 03:35:32 +0000 (22:35 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Sat, 30 Mar 2013 03:35:32 +0000 (22:35 -0500)
src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
src/switch_ivr_play_say.c

index 96d9917df1353bf9fd22c00680e886461045c2cc..7c2928db4cd0d02897f973cca2045134c432924a 100644 (file)
@@ -2008,7 +2008,9 @@ static JSBool session_speak(JSContext * cx, JSObject * obj, uintN argc, jsval *
        args.buflen = len;
 
        switch_core_speech_flush_tts(&jss->speech->sh);
-       switch_ivr_speak_text_handle(jss->session, &jss->speech->sh, &jss->speech->codec, NULL, text, &args);
+       if (switch_core_codec_ready(&jss->speech->codec)) {
+               switch_ivr_speak_text_handle(jss->session, &jss->speech->sh, &jss->speech->codec, NULL, text, &args);
+       }
        JS_ResumeRequest(cx, cb_state.saveDepth);
        check_hangup_hook(jss, &ret);
        *rval = cb_state.ret;
index 59dab6c904ff20ad7eeb9e18ca15ba24aafdd79d..3ce8b6bc723fa40d0bd33ca7ae7f73b236ff0866 100644 (file)
@@ -2141,6 +2141,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
                return SWITCH_STATUS_FALSE;
        }
 
+       if (!switch_core_codec_ready(codec)) {
+               return SWITCH_STATUS_FALSE;
+       }
+
        arg_recursion_check_start(args);
 
        write_frame.data = abuf;