diff options
author | Harald Welte <laforge@gnumonks.org> | 2013-10-06 12:23:35 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2013-10-06 12:23:35 +0200 |
commit | 2bfc01dfd8830cf36bb8f7564604f7f357c0a0fb (patch) | |
tree | 6267e0a2f1d464d223842efefecb7b7aa61a2612 /src/trau/osmo_ortp.c | |
parent | 51b796122ccb3f7952d8826c75bd803c0df65992 (diff) |
enable support of libortp >= 0.21, which has an API breakage
in libortp >= 0.21, rtp_session_set_local_addr() has one extra
argument for the RTCP port.
Diffstat (limited to 'src/trau/osmo_ortp.c')
-rw-r--r-- | src/trau/osmo_ortp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 7faca417..7dcff60c 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -37,6 +37,7 @@ #include <ortp/port.h> #include <ortp/rtpsession.h> +#include "config.h" static PayloadType *payload_type_efr; static PayloadType *payload_type_hr; @@ -348,8 +349,11 @@ struct osmo_rtp_socket *osmo_rtp_socket_create(void *talloc_ctx, unsigned int fl int osmo_rtp_socket_bind(struct osmo_rtp_socket *rs, const char *ip, int port) { int rc; - +#ifdef HAVE_ORTP_021 + rc = rtp_session_set_local_addr(rs->sess, ip, port, port+1); +#else rc = rtp_session_set_local_addr(rs->sess, ip, port); +#endif if (rc < 0) return rc; |