diff --git a/modules/avcodec/sdp.c b/modules/avcodec/sdp.c index 7f15c82db..b6756519f 100644 --- a/modules/avcodec/sdp.c +++ b/modules/avcodec/sdp.c @@ -47,7 +47,7 @@ int avcodec_h264_fmtp_enc(struct mbuf *mb, const struct sdp_format *fmt, conf_get_str(conf_cur(), "avcodec_profile_level_id", profile_level_id, sizeof(profile_level_id)); - conf_get_str(conf_cur(), "video_fmtp_append", + conf_get_str(conf_cur(), "avcodec_fmtp_append", append, sizeof(append)); if (str_isset(profile_level_id)) { diff --git a/modules/ice/ice.c b/modules/ice/ice.c index 4ae983e25..48aafd17c 100644 --- a/modules/ice/ice.c +++ b/modules/ice/ice.c @@ -239,7 +239,7 @@ static int cand_gather_relayed(struct mnat_media *m, struct comp *comp, err = turnc_alloc(&turnc, stun_conf(icem_stun(m->icem)), IPPROTO_UDP, comp->sock, layer, &m->sess->srv, username, password, - 60, NULL, turnc_handler, comp); + 60, turnc_handler, comp); if (err) return err; diff --git a/modules/turn/turn.c b/modules/turn/turn.c index 27dd78b6f..5468a6578 100644 --- a/modules/turn/turn.c +++ b/modules/turn/turn.c @@ -215,7 +215,7 @@ static void turn_handler(int err, uint16_t scode, const char *reason, err = turnc_alloc(&other->turnc, NULL, IPPROTO_UDP, other->sock, LAYER, &m->sess->srv, m->sess->user, m->sess->pass, - TURN_DEFAULT_LIFETIME, &token, + TURN_DEFAULT_LIFETIME, turn_handler, other); } else @@ -250,7 +250,7 @@ static void tcp_estab_handler(void *arg) err = turnc_alloc(&comp->turnc, NULL, IPPROTO_TCP, comp->tc, 0, &m->sess->srv, m->sess->user, m->sess->pass, - TURN_DEFAULT_LIFETIME, NULL, turn_handler, comp); + TURN_DEFAULT_LIFETIME, turn_handler, comp); if (err) { m->sess->estabh(err, 0, NULL, m->sess->arg); } @@ -284,7 +284,7 @@ static int media_start(struct mnat_sess *sess, struct mnat_media *m) err |= turnc_alloc(&comp->turnc, NULL, IPPROTO_UDP, comp->sock, LAYER, &sess->srv, sess->user, sess->pass, - TURN_DEFAULT_LIFETIME, NULL, + TURN_DEFAULT_LIFETIME, turn_handler, comp); break; diff --git a/src/bfcp.c b/src/bfcp.c index a38b17225..659cbeac2 100644 --- a/src/bfcp.c +++ b/src/bfcp.c @@ -329,12 +329,7 @@ int bfcp_start(struct bfcp *bfcp) return 0; } - floorctrl = sdp_media_rattr(bfcp->sdpm, "floorctrl"); - - if (floorctrl ) - if (str_str(floorctrl, "s")) { - bfcp_send_hello(bfcp); - } + err = bfcp_send_hello(bfcp); return err; } diff --git a/src/call.c b/src/call.c index acebe29f3..821fbf88f 100644 --- a/src/call.c +++ b/src/call.c @@ -318,8 +318,10 @@ static int update_streams(struct call *call) else video_stop(call->video); - if (stream_is_ready(video_strm(call->slides))) + if (stream_is_ready(video_strm(call->slides))){ + err |= bfcp_start(call->bfcp); err |= video_update(call->slides, call->peer_uri); + } else video_stop(call->slides); @@ -856,6 +858,12 @@ int call_streams_alloc(struct call *call) return err; if (str_isset(call->cfg->bfcp.proto)) { + err = bfcp_alloc(&call->bfcp, call->sdp, + &call->cfg->bfcp, !call->got_offer, + acc->mnat, call->mnats); + if (err) + return err; + err = video_alloc(&call->slides, &call->streaml, &strm_prm, call->cfg, call->sdp, @@ -869,12 +877,6 @@ int call_streams_alloc(struct call *call) if (err) return err; - - err = bfcp_alloc(&call->bfcp, call->sdp, - &call->cfg->bfcp, !call->got_offer, - acc->mnat, call->mnats); - if (err) - return err; } }