Commit 49819437 authored by Saul Ibarra's avatar Saul Ibarra

Fixed error when stream statistics is None

parent b8e17af0
......@@ -400,6 +400,7 @@ class SessionItem(QObject):
def _SH_TimerFired(self):
stats = self.video_stream.statistics if self.video_stream else self.audio_stream.statistics
if stats is not None:
self.latency = stats['rtt']['avg'] / 1000
self.packet_loss = int(stats['rx']['packets_lost']*100.0/stats['rx']['packets']) if stats['rx']['packets'] else 0
self.duration += timedelta(seconds=1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment