do not log data track stats if not started (#4468)

This commit is contained in:
Raja Subramanian
2026-04-23 10:46:33 +05:30
committed by GitHub
parent 9ee06635d6
commit 31083307ec
+2
View File
@@ -89,6 +89,7 @@ func (d *dataTrackStats) Close() {
d.endTime = mono.UnixNano() d.endTime = mono.UnixNano()
if d.startTime != 0 {
duration := time.Duration(d.endTime - d.startTime).Seconds() duration := time.Duration(d.endTime - d.startTime).Seconds()
fps := float64(d.numFrames) / duration fps := float64(d.numFrames) / duration
@@ -102,3 +103,4 @@ func (d *dataTrackStats) Close() {
"fps", fps, "fps", fps,
) )
} }
}