mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-29 06:22:00 -08:00
playback: decrease concatenation tolerance to 0.5 secs (#3199)
This commit is contained in:
parent
c263fc6f7b
commit
b64e082253
1 changed files with 3 additions and 3 deletions
|
|
@ -14,7 +14,7 @@ import (
|
|||
|
||||
const (
|
||||
sampleFlagIsNonSyncSample = 1 << 16
|
||||
concatenationTolerance = 1 * time.Second
|
||||
concatenationTolerance = 500 * time.Millisecond
|
||||
fmp4Timescale = 90000
|
||||
)
|
||||
|
||||
|
|
@ -266,8 +266,6 @@ func fmp4ReadMaxDuration(r io.ReadSeeker) (time.Duration, error) {
|
|||
return 0, fmt.Errorf("invalid tfdt box: %w", err)
|
||||
}
|
||||
|
||||
elapsed := tfdt.BaseMediaDecodeTimeV1
|
||||
|
||||
// parse trun
|
||||
|
||||
_, err = io.ReadFull(r, buf)
|
||||
|
|
@ -294,6 +292,8 @@ func fmp4ReadMaxDuration(r io.ReadSeeker) (time.Duration, error) {
|
|||
return 0, fmt.Errorf("invalid trun box: %w", err)
|
||||
}
|
||||
|
||||
elapsed := tfdt.BaseMediaDecodeTimeV1
|
||||
|
||||
for _, entry := range trun.Entries {
|
||||
elapsed += uint64(entry.SampleDuration)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue