From b6774eab3b323275a6b5b91fbeb4f61718a071ec Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Mon, 22 Apr 2013 14:49:42 -0400 Subject: [PATCH] Bug 863929: Fix codec list loop exit calculation r=ehugg --- media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c b/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c index beebf3f7bd08..03173aef719d 100644 --- a/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c +++ b/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c @@ -3247,15 +3247,15 @@ gsmsdp_negotiate_codec (fsmdef_dcb_t *dcb_p, cc_sdp_t *sdp_p, found_codec = TRUE; - if(media->num_payloads >= payload_types_count) { - /* We maxed our allocated memory -- processing is done. */ - return codec; - } /* Incrementing this number serves as a "commit" for the payload_info. If we bail out of the loop before this happens, then the collected information is abandoned. */ media->num_payloads++; + if(media->num_payloads >= payload_types_count) { + /* We maxed our allocated memory -- processing is done. */ + return codec; + } if(offer) { /* If we are creating an answer, return after the first match. -- 2.11.4.GIT