]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 27 Mar 2008 22:46:47 +0000 (22:46 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 27 Mar 2008 22:46:47 +0000 (22:46 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7974 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_utils.h
src/mod/endpoints/mod_sofia/sofia_glue.c
src/switch_loadable_module.c

index 7e50bef89accfecbe602aac06477c190ea0817e3..18655ef46ea789e80f1b558d150587f6777eb4b4 100644 (file)
@@ -45,7 +45,7 @@ SWITCH_BEGIN_EXTERN_C
 #define SWITCH_SMAX 32767
 #define SWITCH_SMIN -32768
 #define switch_normalize_to_16bit(n) if (n > SWITCH_SMAX) n = SWITCH_SMAX / 2; else if (n < SWITCH_SMIN) n = SWITCH_SMIN / 2;
-#define switch_codec2str(codec,buf,len) snprintf(buf, len, "%s@%uk@%ui", \
+#define switch_codec2str(codec,buf,len) snprintf(buf, len, "%s@%uh@%ui", \
                                                  codec->implementation->iananame, \
                                                  codec->implementation->samples_per_second, \
                                                  codec->implementation->microseconds_per_frame / 1000)
index dfd38d82005f2307c843a96d0d04792aef5f7a6d..e1e0689537df7e558291920ed61586368c15630e 100644 (file)
@@ -162,9 +162,6 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, uint32
                        
                        rate = imp->samples_per_second;
                        
-                       if (ptime && ptime != imp->microseconds_per_frame / 1000) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "ptime %u != advertised ptime %u\n", imp->microseconds_per_frame / 1000, ptime);
-                       }
                        switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=rtpmap:%d %s/%d\n", imp->ianacode, imp->iananame, rate);
                        if (imp->fmtp) {
                                switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=fmtp:%d %s\n", imp->ianacode, imp->fmtp);
@@ -343,7 +340,7 @@ void sofia_glue_tech_prepare_codecs(private_object_t *tech_pvt)
                                codec_string = tech_pvt->profile->codec_string;
                        }
                }
-
+               
                if ((ocodec = switch_channel_get_variable(tech_pvt->channel, SWITCH_ORIGINATOR_CODEC_VARIABLE))) {
                        if (!codec_string || (tech_pvt->profile->pflags & PFLAG_DISABLE_TRANSCODING)) {
                                codec_string = ocodec;
@@ -354,7 +351,7 @@ void sofia_glue_tech_prepare_codecs(private_object_t *tech_pvt)
                        }
                }
        }
-
+       
        if (codec_string) {
                char *tmp_codec_string;
                if ((tmp_codec_string = switch_core_session_strdup(tech_pvt->session, codec_string))) {
index 3c750d547d1b968f1349ac2b810649d6d4b4dfd6..3b45a3f8a8452443282788fe5d0f8f521e7825d2 100644 (file)
@@ -1251,11 +1251,10 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
                last = name = next = cur = buf;
 
                for (;;) {
-
-
                        if (!next) {
                                break;
                        }
+                       
                        if ((p = strchr(next, '@'))) {
                                *p++ = '\0';
                        }