mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-05 07:36:57 +08:00
rtsp: add random value to timestamp of tracks from other protocols (#3071)
This commit is contained in:
@@ -10,14 +10,6 @@ import (
|
||||
"github.com/bluenviron/mediamtx/internal/unit"
|
||||
)
|
||||
|
||||
// avoid an int64 overflow and preserve resolution by splitting division into two parts:
|
||||
// first add the integer part, then the decimal part.
|
||||
func multiplyAndDivide(v, m, d time.Duration) time.Duration {
|
||||
secs := v / d
|
||||
dec := v % d
|
||||
return (secs*m + dec*m/d)
|
||||
}
|
||||
|
||||
// Processor cleans and normalizes streams.
|
||||
type Processor interface {
|
||||
// process a Unit.
|
||||
|
Reference in New Issue
Block a user