recorder: fix segment duration when audio is in advance (#4563)

This commit is contained in:
Alessandro Ros
2025-05-27 15:28:30 +02:00
committed by GitHub
parent 7b977861ff
commit e799286f1c
4 changed files with 13 additions and 14 deletions
-1
View File
@@ -72,7 +72,6 @@ func (t *formatFMP4Track) write(sample *sample) error {
if (!t.f.hasVideo || t.initTrack.Codec.IsVideo()) &&
!t.nextSample.IsNonSyncSample &&
(nextDTS-t.f.currentSegment.startDTS) >= t.f.ri.segmentDuration {
t.f.currentSegment.lastDTS = nextDTS
err := t.f.currentSegment.close()
if err != nil {
return err