ortp: Guard the jitter stats with a version check
ortp 0.18 has introduced the jitter_stats but we only check for
0.21 an later. It is okay that at some point the jitter stats
will be reported. For previous versions it is 0.
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c
index 7edcd03..65ec269 100644
--- a/src/trau/osmo_ortp.c
+++ b/src/trau/osmo_ortp.c
@@ -553,7 +553,6 @@
uint32_t *recv_lost, uint32_t *last_jitter)
{
const rtp_stats_t *stats;
- const jitter_stats_t *jitter;
*sent_packets = *sent_octets = *recv_packets = *recv_octets = 0;
*recv_lost = *last_jitter = 0;
@@ -568,7 +567,11 @@
*recv_lost = stats->cum_packet_loss;
}
+#if HAVE_ORTP_021
+ const jitter_stats_t *jitter;
+
jitter = rtp_session_get_jitter_stats(rs->sess);
if (jitter)
*last_jitter = jitter->jitter;
+#endif
}