do not log data track stats if not started (#4468)
This commit is contained in:
@@ -89,6 +89,7 @@ func (d *dataTrackStats) Close() {
|
||||
|
||||
d.endTime = mono.UnixNano()
|
||||
|
||||
if d.startTime != 0 {
|
||||
duration := time.Duration(d.endTime - d.startTime).Seconds()
|
||||
fps := float64(d.numFrames) / duration
|
||||
|
||||
@@ -101,4 +102,5 @@ func (d *dataTrackStats) Close() {
|
||||
"numFrames", d.numFrames,
|
||||
"fps", fps,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user