]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8391 #resolve [SDP parsing error for rtcp-fb]
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 27 Oct 2015 15:58:04 +0000 (10:58 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 27 Oct 2015 15:58:04 +0000 (10:58 -0500)
src/switch_core_media.c

index 06dc92ebaf3c283369559424ce7535a873332eda..096edeb1d05862c4ac60146d2c98c6643819877c 100644 (file)
@@ -7173,24 +7173,12 @@ SWITCH_DECLARE(void)switch_core_media_set_local_sdp(switch_core_session_t *sessi
 
 static void add_fb(char *buf, uint32_t buflen, int pt, int fir, int nack, int pli, int tmmbr)
 {
-       const char *zfir = "";
-       const char *ztmmbr = "";
-       char *sp = "";
-
        if (fir) {
-               zfir = "fir";
+               switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=rtcp-fb:%d ccm fir\n", pt);
        }
 
        if (tmmbr) {
-               ztmmbr = "tmmbr";
-       }
-
-       if (fir && tmmbr) {
-               sp = " ";
-       }
-
-       if (!zstr(zfir) || !zstr(ztmmbr)) {
-               switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=rtcp-fb:%d ccm %s%s%s\n", pt, zfir, sp, ztmmbr);
+               switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=rtcp-fb:%d ccm tmmbr\n", pt);
        }
 
        if (nack) {