Skip to content

Commit

Permalink
fix duration
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 committed Sep 20, 2023
1 parent 149a08c commit 925d71d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/pipeline/sink/segments.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ func (s *SegmentSink) endSegment(filename string, endTime uint64) error {
}
delete(s.openSegmentsStartTime, filename)

duration := float64(time.Duration(endTime-t) / time.Second)
segmentStartTime := s.startTime.Add(time.Duration(t - s.startRunningTime))
if err := s.playlist.Append(segmentStartTime, float64(endTime-t), filename); err != nil {
if err := s.playlist.Append(segmentStartTime, duration, filename); err != nil {
return err
}

Expand Down

0 comments on commit 925d71d

Please sign in to comment.