]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
some more changes relates to new bypass media controls
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 3 Oct 2014 23:43:18 +0000 (18:43 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 3 Oct 2014 23:43:23 +0000 (18:43 -0500)
src/switch_core_media.c

index 852cdfc4bc4271134f9b93d9d6b2686cfc24865a..73d404cfa906ba363a2a7c888d1a242129fee87f 100644 (file)
@@ -7872,6 +7872,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_receive_message(switch_core_se
 
        case SWITCH_MESSAGE_INDICATE_MEDIA:
                {
+
+                       a_engine->codec_negotiated = 0;
+                       v_engine->codec_negotiated = 0;
+                       
                        if (session->track_duration) {
                                switch_core_session_enable_heartbeat(session, session->track_duration);
                        }
@@ -7886,9 +7890,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_receive_message(switch_core_se
 
                        switch_channel_set_flag(session->channel, CF_PROXY_MODE);
 
-                       a_engine->codec_negotiated = 0;
-                       v_engine->codec_negotiated = 0;
-
                        switch_core_media_set_local_sdp(session, NULL, SWITCH_FALSE);
 
                        if (switch_true(switch_channel_get_variable(session->channel, "bypass_keep_codec"))) {
@@ -8966,7 +8967,7 @@ SWITCH_DECLARE(char *) switch_core_media_filter_sdp(const char *sdp_str, const c
        }
 
 
-       len = strlen(sdp_str) + 1;
+       len = strlen(sdp_str) + 2;
        new_sdp = malloc(len);
        o = new_sdp;
        i = sdp_str;