]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
only negotiate codecs that were previously negotiated on re-invites unless its intent...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 11 Dec 2014 19:22:43 +0000 (13:22 -0600)
committerBrian West <brian@freeswitch.org>
Thu, 11 Dec 2014 21:03:53 +0000 (15:03 -0600)
src/switch_core_media.c

index 1c7c369474b86a9166a60c8f3e659bd310a23c37..f6e7b32b3947063e3a998e334a7111fc4a55d9b0 100644 (file)
@@ -3442,6 +3442,12 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
                                reneg = 0;
                        }
                        
+                       if (sdp_type == SDP_TYPE_RESPONSE && smh->num_negotiated_codecs) {
+                               /* response to re-invite or update, only negotiated codecs are valid */
+                               reneg = 0;
+                       }
+
+
                        if (!reneg && smh->num_negotiated_codecs) {
                                codec_array = smh->negotiated_codecs;
                                total_codecs = smh->num_negotiated_codecs;
@@ -8002,6 +8008,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_receive_message(switch_core_se
 
                                a_engine->codec_negotiated = 0;
                                v_engine->codec_negotiated = 0;
+                               smh->num_negotiated_codecs = 0;
                                switch_channel_clear_flag(session->channel, CF_VIDEO_POSSIBLE);
                                switch_core_media_prepare_codecs(session, SWITCH_TRUE);
                                switch_core_media_check_video_codecs(session);