diff --git a/pkg/codecs/h264/dts_extractor.go b/pkg/codecs/h264/dts_extractor.go index 4042e89..82e04a6 100644 --- a/pkg/codecs/h264/dts_extractor.go +++ b/pkg/codecs/h264/dts_extractor.go @@ -206,7 +206,7 @@ func (d *DTSExtractor) Extract(au [][]byte, pts time.Duration) (time.Duration, e return 0, fmt.Errorf("DTS is greater than PTS") } - if d.prevDTSFilled && dts <= d.prevDTS { + if d.prevDTSFilled && dts < d.prevDTS { return 0, fmt.Errorf("DTS is not monotonically increasing, was %v, now is %v", d.prevDTS, dts) } diff --git a/pkg/codecs/h265/dts_extractor.go b/pkg/codecs/h265/dts_extractor.go index d7b5297..8559f57 100644 --- a/pkg/codecs/h265/dts_extractor.go +++ b/pkg/codecs/h265/dts_extractor.go @@ -227,7 +227,7 @@ func (d *DTSExtractor) Extract(au [][]byte, pts time.Duration) (time.Duration, e return 0, fmt.Errorf("DTS is greater than PTS") } - if d.prevDTSFilled && dts <= d.prevDTS { + if d.prevDTSFilled && dts < d.prevDTS { return 0, fmt.Errorf("DTS is not monotonically increasing, was %v, now is %v", d.prevDTS, dts) }