recorder: fix segment duration when audio is in advance (#4563)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user