diff --git a/lib/nodes/rtp.c b/lib/nodes/rtp.c index 6c566e513..70e05a530 100644 --- a/lib/nodes/rtp.c +++ b/lib/nodes/rtp.c @@ -112,6 +112,7 @@ int rtp_init(struct node *n) r->aimd.b = 0.5; r->aimd.last_rate = 100; + r->rtcp.enabled = false; r->rtcp.throttle_mode = RTCP_THROTTLE_DISABLED; return 0; @@ -173,7 +174,10 @@ int rtp_parse(struct node *n, json_t *cfg) const char *mode = "aimd"; const char *throttle_mode = "decimate"; - ret = json_unpack_ex(json_rtcp, &err, 0, "{ s?: b, s?: s }", + /* Enable if RTCP section is available */ + r->rtcp.enabled = 1; + + ret = json_unpack_ex(json_rtcp, &err, 0, "{ s?: b, s?: s, s?: s }", "enabled", &r->rtcp.enabled, "mode", &mode, "throttle_mode", &throttle_mode diff --git a/tests/integration/pipe-loopback-rtp.sh b/tests/integration/pipe-loopback-rtp.sh index b9c45015b..802ba4164 100755 --- a/tests/integration/pipe-loopback-rtp.sh +++ b/tests/integration/pipe-loopback-rtp.sh @@ -50,6 +50,11 @@ cat > ${CONFIG_FILE} << EOF "format" : "${FORMAT}", "vectorize" : ${VECTORIZE}, + "rtcp" : { + "enabled" : true, + "throttle_mode" : "limit_rate" + }, + "in" : { "address" : "127.0.0.1:12000",