]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_sofia: My iLBC changes caused a problem with fmtp was empty, this should fix it
authorMarc Olivier Chouinard <mochouinard@moctel.com>
Sat, 6 Mar 2010 22:51:33 +0000 (22:51 +0000)
committerMarc Olivier Chouinard <mochouinard@moctel.com>
Sat, 6 Mar 2010 22:51:33 +0000 (22:51 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16928 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c

index 0e9b0b9352edc3c0801acefc1d957c4e291ab6fb..ef325c4e64c6d64aaae2d591b101148573c04a0a 100644 (file)
@@ -3546,8 +3546,8 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
                                }
 
                                if (!strcasecmp((char *) rm_encoding, "ilbc")) {
-                                       char *mode = strstr(map->rm_fmtp, "mode=");
-                                       if (mode && (mode + 5)) {
+                                       char *mode = NULL;
+                                       if (map->rm_fmtp && (mode = strstr(map->rm_fmtp, "mode=")) && (mode + 5)) {
                                                codec_ms = atoi(mode + 5);
                                        }
                                        if (!codec_ms) {