From d10f4e3b1fb593ca7d426b85780b363783921ee9 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 6 Apr 2019 14:19:50 +0200 Subject: [PATCH] rtp: allow compilation without hook support --- lib/nodes/rtp.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/nodes/rtp.cpp b/lib/nodes/rtp.cpp index e88dff11f..f99865618 100644 --- a/lib/nodes/rtp.cpp +++ b/lib/nodes/rtp.cpp @@ -391,6 +391,7 @@ int rtp_start(struct node *n) /* Initialize throttle hook */ if (r->rtcp.throttle_mode != RTCP_THROTTLE_DISABLED) { +#ifdef WITH_HOOKS switch (r->rtcp.throttle_mode) { case RTCP_THROTTLE_HOOK_DECIMATE: r->rtcp.throttle_hook.decimate = new DecimateHook(nullptr, n, 0, 0); @@ -405,6 +406,10 @@ int rtp_start(struct node *n) } vlist_push(&n->out.hooks, (void *) r->rtcp.throttle_hook.limit_rate); +#else + r->logger->error("Throttle hooks not supported"); + return -1; +#endif } ret = rtp_set_rate(n, r->aimd.last_rate);