diff options
author | Alfred E. Heggestad <aeh@db.org> | 2014-05-17 22:31:04 +0200 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2014-05-17 22:31:04 +0200 |
commit | b2d645892600b8103293587662fb81baae3d8220 (patch) | |
tree | 59434420b0b38177e26dd2df31b659dd1efdcc22 /src | |
parent | 0a310a2d7e9041a5da3ac04111569648824f70d7 (diff) |
rtp_stats: skip if no packets were sent/recv'd
Diffstat (limited to 'src')
-rw-r--r-- | src/stream.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stream.c b/src/stream.c index 22dfa96..0825fe9 100644 --- a/src/stream.c +++ b/src/stream.c @@ -74,6 +74,11 @@ static inline int lostcalc(struct stream *s, uint16_t seq) static void print_rtp_stats(const struct stream *s) { + bool started = s->metric_tx.n_packets>0 || s->metric_rx.n_packets>0; + + if (!started) + return; + info("\n%-9s Transmit: Receive:\n" "packets: %7u %7u\n" "avg. bitrate: %7.1f %7.1f (kbit/s)\n" |