]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5132 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 27 Feb 2013 18:11:55 +0000 (12:11 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 27 Feb 2013 18:11:55 +0000 (12:11 -0600)
src/switch_core_io.c
src/switch_ivr_async.c

index dfecf692fb706d34b0334cc677f9afef67ab068c..696de1cab036f0c2f9b2cc6b4d8cc442b4384354 100644 (file)
@@ -299,6 +299,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
                do_resample = 1;
        }
 
+       if (session->bugs && !need_codec) {
+               do_bugs = 1;
+               need_codec = 1;
+       }
+
        if (switch_test_flag(*frame, SFF_CNG)) {
                if (!session->bugs && !session->plc) {
                        /* Check if other session has bugs */
@@ -967,6 +972,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
                need_codec = TRUE;
        }
 
+       if (session->bugs && !need_codec) {
+               do_bugs = TRUE;
+               need_codec = TRUE;
+       }
+
        if (frame->codec->implementation->actual_samples_per_second != session->write_impl.actual_samples_per_second) {
                need_codec = TRUE;
                do_resample = TRUE;
index d6b8c172c5db584d577237edab4017c346a102a6..65b1775a49d7d6082479c8c227cfebe29a4a7222 100644 (file)
@@ -1108,14 +1108,12 @@ static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, s
                {
                        nframe = switch_core_media_bug_get_native_read_frame(bug);
                        len = nframe->datalen;
-                       printf("WRITE IN %d\n", nframe->datalen);
                        switch_core_file_write(&rh->in_fh, nframe->data, &len);
                }
                break;
        case SWITCH_ABC_TYPE_TAP_NATIVE_WRITE:
                {
                        nframe = switch_core_media_bug_get_native_write_frame(bug);
-                       printf("WRITE OUT %d\n", nframe->datalen);
                        len = nframe->datalen;
                        switch_core_file_write(&rh->out_fh, nframe->data, &len);
                }