Bug 800688: remove local_dynamic_payload_type_value from negotiation r=ehugg,jesup
authorEnda Mannion <emannion@gmail.com>
Wed, 17 Oct 2012 15:57:52 +0100
changeset 110822 e796f2c1121a7f4318a7ecb7ba5fbadd10c36dfe
parent 110821 783cece761300125a18fe62da5d0174f7a24a2c6
child 110823 30a31da7097f1bb8d9662b2a7bd71c2d05e283ec
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersehugg, jesup
bugs800688
milestone19.0a1
Bug 800688: remove local_dynamic_payload_type_value from negotiation r=ehugg,jesup
media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
--- a/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
+++ b/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
@@ -2648,17 +2648,16 @@ gsmsdp_negotiate_codec (fsmdef_dcb_t *dc
     boolean         usedtx;
     boolean         stereo;
     boolean         useinbandfec;
     boolean         cbr;
     boolean         found_codec = FALSE;
     int32_t         num_match_payloads = 0;
     int             payload = RTP_NONE;
     int             remote_dynamic_payload_type_value = RTP_NONE;
-    int             local_dynamic_payload_type_value = RTP_NONE;
     int32_t         payload_types_count = 0; // count for allocating right amout
                                              // of memory for media->paylaods
 
     if (!dcb_p || !sdp_p || !media) {
         return (RTP_NONE);
     }
 
     level = media->level;
@@ -2818,27 +2817,24 @@ gsmsdp_negotiate_codec (fsmdef_dcb_t *dc
     for (i = 0; i < num_master_types; i++) {
         for (j = 0; j < num_slave_types; j++) {
             if (GET_CODEC_TYPE(master_list_p[i]) == GET_CODEC_TYPE(slave_list_p[j])) {
                 payload = GET_CODEC_TYPE(slave_list_p[j]);
                 if (offer == TRUE) { // if remote SDP is an offer
                     /* we answer with same dynamic payload type value for a given dynamic payload type */
                     if (master_list_p == remote_media_types) {
                         remote_dynamic_payload_type_value = GET_DYN_PAYLOAD_TYPE_VALUE(master_list_p[i]);
-                        local_dynamic_payload_type_value = GET_DYN_PAYLOAD_TYPE_VALUE(master_list_p[i]);
                     } else {
                         remote_dynamic_payload_type_value = GET_DYN_PAYLOAD_TYPE_VALUE(slave_list_p[j]);
-                        local_dynamic_payload_type_value = GET_DYN_PAYLOAD_TYPE_VALUE(slave_list_p[j]);
                     }
                 } else { //if remote SDP is an answer
                       if (media->local_dynamic_payload_type_value == RTP_NONE ||
                           media->payload !=  media->previous_sdp.payload_type) {
                         /* If the the negotiated payload type is different from previous,
                            set it the local dynamic to payload type  as this is what we offered*/
-                        local_dynamic_payload_type_value =  media->payload;
                     }
                     /* remote answer may not use the value that we offered for a given dynamic payload type */
                     if (master_list_p == remote_media_types) {
                         remote_dynamic_payload_type_value = GET_DYN_PAYLOAD_TYPE_VALUE(master_list_p[i]);
                     } else {
                         remote_dynamic_payload_type_value = GET_DYN_PAYLOAD_TYPE_VALUE(slave_list_p[j]);
                     }
                 }